Blender V4.3
node_common.cc File Reference
#include <cstddef>
#include <cstring>
#include "DNA_asset_types.h"
#include "DNA_node_types.h"
#include "BLI_listbase.h"
#include "BLI_map.hh"
#include "BLI_multi_value_map.hh"
#include "BLI_set.hh"
#include "BLI_stack.hh"
#include "BLI_string.h"
#include "BLI_string_ref.hh"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "BKE_node.hh"
#include "BKE_node_runtime.hh"
#include "BKE_node_tree_interface.hh"
#include "MEM_guardedalloc.h"
#include "NOD_common.h"
#include "NOD_node_declaration.hh"
#include "NOD_register.hh"
#include "NOD_socket.hh"
#include "NOD_socket_declarations.hh"
#include "NOD_socket_declarations_geometry.hh"
#include "node_common.h"
#include "node_util.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::nodes
 

Functions

static std::function< ID *(const bNode &node)> blender::nodes::get_default_id_getter (const bNodeTreeInterface &tree_interface, const bNodeTreeInterfaceSocket &io_socket)
 
static std::function< void(bNode &node, bNodeSocket &socket, const char *data_path)> blender::nodes::get_init_socket_fn (const bNodeTreeInterface &interface, const bNodeTreeInterfaceSocket &io_socket)
 
static SocketDeclarationPtr blender::nodes::declaration_for_interface_socket (const bNodeTree &ntree, const bNodeTreeInterfaceSocket &io_socket, const eNodeSocketInOut in_out)
 
static int blender::nodes::count_panel_declaration_children (const bNodeTreeInterfacePanel &io_panel)
 
static PanelDeclarationPtr blender::nodes::declaration_for_interface_panel (const bNodeTree &, const bNodeTreeInterfacePanel &io_panel)
 
static void blender::nodes::set_default_input_field (const bNodeTreeInterfaceSocket &input, SocketDeclaration &decl)
 
void blender::nodes::node_group_declare (NodeDeclarationBuilder &b)
 
static void blender::nodes::group_input_declare (NodeDeclarationBuilder &b)
 
static void blender::nodes::group_output_declare (NodeDeclarationBuilder &b)
 
static bool blender::nodes::group_input_insert_link (bNodeTree *ntree, bNode *node, bNodeLink *link)
 
static bool blender::nodes::group_output_insert_link (bNodeTree *ntree, bNode *node, bNodeLink *link)
 
Node Group
static bNodeSocketfind_matching_socket (ListBase &sockets, StringRef identifier)
 
bNodeSocketnode_group_find_input_socket (bNode *groupnode, const char *identifier)
 
bNodeSocketnode_group_find_output_socket (bNode *groupnode, const char *identifier)
 
void node_group_label (const bNodeTree *, const bNode *node, char *label, int label_maxncpy)
 
int node_group_ui_class (const bNode *node)
 
bool node_group_poll_instance (const bNode *node, const bNodeTree *nodetree, const char **r_disabled_hint)
 
std::string node_group_ui_description (const bNode &node)
 
Node Frame
static void node_frame_init (bNodeTree *, bNode *node)
 
void register_node_type_frame ()
 
Node Re-Route
static void node_reroute_declare (blender::nodes::NodeDeclarationBuilder &b)
 
static void node_reroute_init (bNodeTree *, bNode *node)
 
void register_node_type_reroute ()
 
static void propagate_reroute_type_from_start_socket (bNodeSocket *start_socket, const MultiValueMap< bNodeSocket *, bNodeLink * > &links_map, Map< bNode *, const blender::bke::bNodeSocketType * > &r_reroute_types)
 
void ntree_update_reroute_nodes (bNodeTree *ntree)
 
Node #GROUP_INPUT / #GROUP_OUTPUT
bNodeSocketnode_group_input_find_socket (bNode *node, const char *identifier)
 
void register_node_type_group_input ()
 
bNodeSocketnode_group_output_find_socket (bNode *node, const char *identifier)
 
void register_node_type_group_output ()
 

Function Documentation

◆ find_matching_socket()

static bNodeSocket * find_matching_socket ( ListBase & sockets,
StringRef identifier )
static

Definition at line 54 of file node_common.cc.

References LISTBASE_FOREACH.

Referenced by node_group_find_input_socket(), and node_group_find_output_socket().

◆ node_frame_init()

static void node_frame_init ( bNodeTree * ,
bNode * node )
static

Definition at line 548 of file node_common.cc.

References data, and NODE_FRAME_SHRINK.

Referenced by register_node_type_frame().

◆ node_group_find_input_socket()

bNodeSocket * node_group_find_input_socket ( bNode * groupnode,
const char * identifier )

◆ node_group_find_output_socket()

bNodeSocket * node_group_find_output_socket ( bNode * groupnode,
const char * identifier )

◆ node_group_input_find_socket()

bNodeSocket * node_group_input_find_socket ( bNode * node,
const char * identifier )

◆ node_group_label()

void node_group_label ( const bNodeTree * ,
const bNode * node,
char * label,
int label_maxncpy )

◆ node_group_output_find_socket()

bNodeSocket * node_group_output_find_socket ( bNode * node,
const char * identifier )

◆ node_group_poll_instance()

bool node_group_poll_instance ( const bNode * node,
const bNodeTree * nodetree,
const char ** r_disabled_hint )

◆ node_group_ui_class()

◆ node_group_ui_description()

std::string node_group_ui_description ( const bNode & node)

◆ node_reroute_declare()

static void node_reroute_declare ( blender::nodes::NodeDeclarationBuilder & b)
static

Definition at line 580 of file node_common.cc.

References b, blender::StringRefNull::c_str(), and NodeReroute::type_idname.

Referenced by register_node_type_reroute().

◆ node_reroute_init()

static void node_reroute_init ( bNodeTree * ,
bNode * node )
static

Definition at line 593 of file node_common.cc.

References data, and STRNCPY.

Referenced by register_node_type_reroute().

◆ ntree_update_reroute_nodes()

◆ propagate_reroute_type_from_start_socket()

◆ register_node_type_frame()

◆ register_node_type_group_input()

◆ register_node_type_group_output()

◆ register_node_type_reroute()