Blender V4.5
space_node.cc File Reference
#include "AS_asset_representation.hh"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_stack.hh"
#include "BLI_string.h"
#include "DNA_ID.h"
#include "DNA_gpencil_legacy_types.h"
#include "DNA_material_types.h"
#include "DNA_modifier_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "BKE_asset.hh"
#include "BKE_compute_context_cache.hh"
#include "BKE_compute_contexts.hh"
#include "BKE_context.hh"
#include "BKE_gpencil_legacy.h"
#include "BKE_idprop.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_lib_remap.hh"
#include "BKE_node_legacy_types.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_zones.hh"
#include "BKE_screen.hh"
#include "BLT_translation.hh"
#include "ED_image.hh"
#include "ED_node.hh"
#include "ED_node_preview.hh"
#include "ED_screen.hh"
#include "ED_space_api.hh"
#include "UI_view2d.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "BLO_read_write.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "RNA_prototypes.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "NOD_node_in_compute_context.hh"
#include "NOD_socket_interface_key.hh"
#include "io_utils.hh"
#include "node_intern.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::ed
 
namespace  blender::ed::space_node
 

Functions

void ED_node_tree_start (ARegion *region, SpaceNode *snode, bNodeTree *ntree, ID *id, ID *from)
 
void ED_node_tree_push (ARegion *region, SpaceNode *snode, bNodeTree *ntree, bNode *gnode)
 
void ED_node_tree_pop (ARegion *region, SpaceNode *snode)
 
int ED_node_tree_depth (SpaceNode *snode)
 
bNodeTreeED_node_tree_get (SpaceNode *snode, int level)
 
int ED_node_tree_path_length (SpaceNode *snode)
 
void ED_node_tree_path_get (SpaceNode *snode, char *value)
 
void ED_node_set_active_viewer_key (SpaceNode *snode)
 
void ED_node_cursor_location_get (const SpaceNode *snode, float value[2])
 
void ED_node_cursor_location_set (SpaceNode *snode, const float value[2])
 
float2 blender::ed::space_node::space_node_group_offset (const SpaceNode &snode)
 
std::optional< nodes::FoundNestedNodeIDblender::ed::space_node::find_nested_node_id_in_root (const SpaceNode &snode, const bNode &node)
 
std::optional< nodes::FoundNestedNodeIDblender::ed::space_node::find_nested_node_id_in_root (const bNodeTree &root_tree, const ComputeContext *compute_context, const int node_id)
 
std::optional< ObjectAndModifierblender::ed::space_node::get_modifier_for_node_editor (const SpaceNode &snode)
 
bool blender::ed::space_node::node_editor_is_for_geometry_nodes_modifier (const SpaceNode &snode, const Object &object, const NodesModifierData &nmd)
 
const ComputeContextblender::ed::space_node::compute_context_for_zone (const bke::bNodeTreeZone &zone, bke::ComputeContextCache &compute_context_cache, const ComputeContext *parent_compute_context)
 
static const ComputeContextblender::ed::space_node::compute_context_for_zones (const Span< const bke::bNodeTreeZone * > zones, bke::ComputeContextCache &compute_context_cache, const ComputeContext *parent_compute_context)
 
static std::optional< const ComputeContext * > blender::ed::space_node::compute_context_for_tree_path (const SpaceNode &snode, bke::ComputeContextCache &compute_context_cache, const ComputeContext *parent_compute_context)
 
const ComputeContextblender::ed::space_node::compute_context_for_closure_evaluation (const ComputeContext *closure_socket_context, const bNodeSocket &closure_socket, bke::ComputeContextCache &compute_context_cache, const std::optional< nodes::ClosureSourceLocation > &source_location)
 
static const ComputeContextblender::ed::space_node::get_node_editor_root_compute_context (const SpaceNode &snode, bke::ComputeContextCache &compute_context_cache)
 
const ComputeContextblender::ed::space_node::compute_context_for_edittree (const SpaceNode &snode, bke::ComputeContextCache &compute_context_cache)
 
const ComputeContextblender::ed::space_node::compute_context_for_edittree_socket (const SpaceNode &snode, bke::ComputeContextCache &compute_context_cache, const bNodeSocket &socket)
 
const ComputeContextblender::ed::space_node::compute_context_for_edittree_node (const SpaceNode &snode, bke::ComputeContextCache &compute_context_cache, const bNode &node)
 
static SpaceLinkblender::ed::space_node::node_create (const ScrArea *, const Scene *)
 
static void blender::ed::space_node::node_free (SpaceLink *sl)
 
static void blender::ed::space_node::node_init (wmWindowManager *, ScrArea *area)
 
static void blender::ed::space_node::node_exit (wmWindowManager *wm, ScrArea *area)
 
static bool blender::ed::space_node::any_node_uses_id (const bNodeTree *ntree, const ID *id)
 
static void blender::ed::space_node::node_area_tag_tree_recalc (SpaceNode *snode, ScrArea *area)
 
static void blender::ed::space_node::node_area_listener (const wmSpaceTypeListenerParams *params)
 
static void blender::ed::space_node::node_area_refresh (const bContext *C, ScrArea *area)
 
static SpaceLinkblender::ed::space_node::node_duplicate (SpaceLink *sl)
 
static void blender::ed::space_node::node_buttons_region_init (wmWindowManager *wm, ARegion *region)
 
static void blender::ed::space_node::node_buttons_region_draw (const bContext *C, ARegion *region)
 
static void blender::ed::space_node::node_toolbar_region_init (wmWindowManager *wm, ARegion *region)
 
static void blender::ed::space_node::node_toolbar_region_draw (const bContext *C, ARegion *region)
 
static void blender::ed::space_node::node_cursor (wmWindow *win, ScrArea *area, ARegion *region)
 
static void blender::ed::space_node::node_main_region_init (wmWindowManager *wm, ARegion *region)
 
static void blender::ed::space_node::node_main_region_draw (const bContext *C, ARegion *region)
 
static bool blender::ed::space_node::node_group_drop_poll (bContext *C, wmDrag *drag, const wmEvent *)
 
static bool blender::ed::space_node::node_object_drop_poll (bContext *C, wmDrag *drag, const wmEvent *)
 
static bool blender::ed::space_node::node_collection_drop_poll (bContext *C, wmDrag *drag, const wmEvent *)
 
static bool blender::ed::space_node::node_id_im_drop_poll (bContext *, wmDrag *drag, const wmEvent *)
 
static bool blender::ed::space_node::node_mask_drop_poll (bContext *, wmDrag *drag, const wmEvent *)
 
static bool blender::ed::space_node::node_material_drop_poll (bContext *C, wmDrag *drag, const wmEvent *)
 
static bool blender::ed::space_node::node_color_drop_poll (bContext *C, wmDrag *drag, const wmEvent *)
 
static bool blender::ed::space_node::node_import_file_drop_poll (bContext *C, wmDrag *drag, const wmEvent *)
 
static bool blender::ed::space_node::node_socket_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
 
static bool blender::ed::space_node::node_panel_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
 
static void blender::ed::space_node::node_group_drop_copy (bContext *C, wmDrag *drag, wmDropBox *drop)
 
static void blender::ed::space_node::node_id_drop_copy (bContext *C, wmDrag *drag, wmDropBox *drop)
 
static void blender::ed::space_node::node_id_im_drop_copy (bContext *C, wmDrag *drag, wmDropBox *drop)
 
static void blender::ed::space_node::node_import_file_drop_copy (bContext *, wmDrag *drag, wmDropBox *drop)
 
static void blender::ed::space_node::node_socket_drop_copy (bContext *, wmDrag *drag, wmDropBox *drop)
 
static void blender::ed::space_node::node_panel_drop_copy (bContext *, wmDrag *drag, wmDropBox *drop)
 
static std::string blender::ed::space_node::node_socket_drop_tooltip (bContext *, wmDrag *drag, const int[2], wmDropBox *)
 
static std::string blender::ed::space_node::node_panel_drop_tooltip (bContext *, wmDrag *drag, const int[2], wmDropBox *)
 
static void blender::ed::space_node::node_dropboxes ()
 
static void blender::ed::space_node::node_header_region_init (wmWindowManager *, ARegion *region)
 
static void blender::ed::space_node::node_header_region_draw (const bContext *C, ARegion *region)
 
static void blender::ed::space_node::node_region_listener (const wmRegionListenerParams *params)
 
static int blender::ed::space_node::node_context (const bContext *C, const char *member, bContextDataResult *result)
 
static void blender::ed::space_node::node_widgets ()
 
static void blender::ed::space_node::node_id_remap (ID *old_id, ID *new_id, SpaceNode *snode)
 
static void blender::ed::space_node::node_id_remap (ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
 
static void blender::ed::space_node::node_foreach_id (SpaceLink *space_link, LibraryForeachIDData *data)
 
static int blender::ed::space_node::node_space_subtype_get (ScrArea *area)
 
static void blender::ed::space_node::node_space_subtype_set (ScrArea *area, int value)
 
static void blender::ed::space_node::node_space_subtype_item_extend (bContext *C, EnumPropertyItem **item, int *totitem)
 
static blender::StringRefNull blender::ed::space_node::node_space_name_get (const ScrArea *area)
 
static int blender::ed::space_node::node_space_icon_get (const ScrArea *area)
 
static void blender::ed::space_node::node_space_blend_read_data (BlendDataReader *reader, SpaceLink *sl)
 
static void blender::ed::space_node::node_space_blend_write (BlendWriter *writer, SpaceLink *sl)
 
void ED_spacetype_node ()
 

Variables

const char * node_context_dir []
 

Function Documentation

◆ ED_node_cursor_location_get()

void ED_node_cursor_location_get ( const SpaceNode * snode,
float value[2] )

Definition at line 249 of file space_node.cc.

References copy_v2_v2(), SpaceNode::runtime, and value.

◆ ED_node_cursor_location_set()

void ED_node_cursor_location_set ( SpaceNode * snode,
const float value[2] )

Definition at line 254 of file space_node.cc.

References copy_v2_v2(), SpaceNode::runtime, and value.

◆ ED_node_set_active_viewer_key()

◆ ED_node_tree_depth()

int ED_node_tree_depth ( SpaceNode * snode)

Definition at line 183 of file space_node.cc.

References BLI_listbase_count(), and SpaceNode::treepath.

◆ ED_node_tree_get()

bNodeTree * ED_node_tree_get ( SpaceNode * snode,
int level )

◆ ED_node_tree_path_get()

void ED_node_tree_path_get ( SpaceNode * snode,
char * value )
Parameters
valueThe path output at least the size of ED_node_tree_path_length(snode) + 1.

Definition at line 213 of file space_node.cc.

References BLI_assert, ED_node_tree_path_length(), len, LISTBASE_FOREACH_INDEX, SpaceNode::treepath, and value.

◆ ED_node_tree_path_length()

int ED_node_tree_path_length ( SpaceNode * snode)

Definition at line 200 of file space_node.cc.

References length(), LISTBASE_FOREACH_INDEX, and SpaceNode::treepath.

Referenced by ED_node_tree_path_get().

◆ ED_node_tree_pop()

◆ ED_node_tree_push()

◆ ED_node_tree_start()

◆ ED_spacetype_node()

Variable Documentation

◆ node_context_dir

const char* node_context_dir[]
Initial value:
= {
"selected_nodes", "active_node", "light", "material", "world", nullptr}

Definition at line 1510 of file space_node.cc.