Blender  V2.93
Public Attributes | List of all members
bNodeType Struct Reference

Defines a node type. More...

#include <BKE_node.h>

Public Attributes

void * next
 
void * prev
 
char idname [64]
 
int type
 
char ui_name [64]
 
char ui_description [256]
 
int ui_icon
 
float width
 
float minwidth
 
float maxwidth
 
float height
 
float minheight
 
float maxheight
 
short nclass
 
short flag
 
bNodeSocketTemplateinputs
 
bNodeSocketTemplateoutputs
 
char storagename [64]
 
void(* draw_nodetype )(const struct bContext *C, struct ARegion *region, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node, bNodeInstanceKey key)
 
void(* draw_nodetype_prepare )(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node)
 
void(* draw_buttons )(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
 
void(* draw_buttons_ex )(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
 
void(* draw_backdrop )(struct SpaceNode *snode, struct ImBuf *backdrop, struct bNode *node, int x, int y)
 
void(* labelfunc )(struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen)
 
int(* resize_area_func )(struct bNode *node, int x, int y)
 
int(* select_area_func )(struct bNode *node, int x, int y)
 
int(* tweak_area_func )(struct bNode *node, int x, int y)
 
void(* updatefunc )(struct bNodeTree *ntree, struct bNode *node)
 
void(* group_update_func )(struct bNodeTree *ntree, struct bNode *node)
 
void(* initfunc )(struct bNodeTree *ntree, struct bNode *node)
 
void(* freefunc )(struct bNode *node)
 
void(* copyfunc )(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node)
 
void(* initfunc_api )(const struct bContext *C, struct PointerRNA *ptr)
 
void(* freefunc_api )(struct PointerRNA *ptr)
 
void(* copyfunc_api )(struct PointerRNA *ptr, const struct bNode *src_node)
 
bool(* poll )(struct bNodeType *ntype, struct bNodeTree *nodetree, const char **r_disabled_hint)
 
bool(* poll_instance )(struct bNode *node, struct bNodeTree *nodetree, const char **r_disabled_hint)
 
void(* insert_link )(struct bNodeTree *ntree, struct bNode *node, struct bNodeLink *link)
 
void(* update_internal_links )(struct bNodeTree *, struct bNode *node)
 
void(* free_self )(struct bNodeType *ntype)
 
NodeInitExecFunction init_exec_fn
 
NodeFreeExecFunction free_exec_fn
 
NodeExecFunction exec_fn
 
NodeGPUExecFunction gpu_fn
 
NodeExpandInMFNetworkFunction expand_in_mf_network
 
NodeGeometryExecFunction geometry_node_execute
 
ExtensionRNA rna_ext
 

Detailed Description

Defines a node type.

Initial attributes and constants for a node as well as callback functions implementing the node behavior.

Definition at line 221 of file BKE_node.h.

Member Data Documentation

◆ copyfunc

void(* bNodeType::copyfunc) (struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node)

Make a copy of the node instance.

Definition at line 283 of file BKE_node.h.

Referenced by BKE_node_copy_ex(), and node_type_storage().

◆ copyfunc_api

void(* bNodeType::copyfunc_api) (struct PointerRNA *ptr, const struct bNode *src_node)

Definition at line 290 of file BKE_node.h.

Referenced by BKE_node_copy_ex().

◆ draw_backdrop

void(* bNodeType::draw_backdrop) (struct SpaceNode *snode, struct ImBuf *backdrop, struct bNode *node, int x, int y)

Definition at line 258 of file BKE_node.h.

Referenced by node_composit_set_butfunc().

◆ draw_buttons

void(* bNodeType::draw_buttons) (struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)

Definition at line 253 of file BKE_node.h.

Referenced by ED_node_init_butfuncs(), node_common_set_butfunc(), node_composit_set_butfunc(), node_shader_set_butfunc(), node_socket_add_replace(), node_texture_set_butfunc(), register_node_type_fn_boolean_math(), register_node_type_fn_float_compare(), register_node_type_fn_input_string(), register_node_type_fn_input_vector(), register_node_type_geo_align_rotation_to_vector(), register_node_type_geo_attribute_clamp(), register_node_type_geo_attribute_color_ramp(), register_node_type_geo_attribute_combine_xyz(), register_node_type_geo_attribute_compare(), register_node_type_geo_attribute_convert(), register_node_type_geo_attribute_fill(), register_node_type_geo_attribute_map_range(), register_node_type_geo_attribute_math(), register_node_type_geo_attribute_mix(), register_node_type_geo_attribute_proximity(), register_node_type_geo_attribute_randomize(), register_node_type_geo_attribute_separate_xyz(), register_node_type_geo_attribute_vector_math(), register_node_type_geo_boolean(), register_node_type_geo_collection_info(), register_node_type_geo_mesh_primitive_circle(), register_node_type_geo_mesh_primitive_cone(), register_node_type_geo_mesh_primitive_cylinder(), register_node_type_geo_mesh_primitive_line(), register_node_type_geo_object_info(), register_node_type_geo_point_distribute(), register_node_type_geo_point_instance(), register_node_type_geo_point_rotate(), register_node_type_geo_point_scale(), register_node_type_geo_point_translate(), register_node_type_geo_points_to_volume(), register_node_type_geo_sample_texture(), register_node_type_geo_triangulate(), register_node_type_geo_volume_to_mesh(), and ui_node_draw_input().

◆ draw_buttons_ex

void(* bNodeType::draw_buttons_ex) (struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)

◆ draw_nodetype

void(* bNodeType::draw_nodetype) (const struct bContext *C, struct ARegion *region, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node, bNodeInstanceKey key)

◆ draw_nodetype_prepare

void(* bNodeType::draw_nodetype_prepare) (const struct bContext *C, struct bNodeTree *ntree, struct bNode *node)

◆ exec_fn

NodeExecFunction bNodeType::exec_fn

Definition at line 319 of file BKE_node.h.

Referenced by node_type_exec().

◆ expand_in_mf_network

NodeExpandInMFNetworkFunction bNodeType::expand_in_mf_network

◆ flag

short bNodeType::flag

Definition at line 233 of file BKE_node.h.

Referenced by node_init(), node_type_base(), and node_type_base_custom().

◆ free_exec_fn

NodeFreeExecFunction bNodeType::free_exec_fn

Definition at line 318 of file BKE_node.h.

Referenced by node_type_exec().

◆ free_self

void(* bNodeType::free_self) (struct bNodeType *ntype)

◆ freefunc

void(* bNodeType::freefunc) (struct bNode *node)

Free the node instance.

Definition at line 281 of file BKE_node.h.

Referenced by node_type_storage().

◆ freefunc_api

void(* bNodeType::freefunc_api) (struct PointerRNA *ptr)

Definition at line 289 of file BKE_node.h.

◆ geometry_node_execute

NodeGeometryExecFunction bNodeType::geometry_node_execute

Definition at line 327 of file BKE_node.h.

Referenced by register_node_type_geo_align_rotation_to_vector(), register_node_type_geo_attribute_clamp(), register_node_type_geo_attribute_color_ramp(), register_node_type_geo_attribute_combine_xyz(), register_node_type_geo_attribute_compare(), register_node_type_geo_attribute_convert(), register_node_type_geo_attribute_fill(), register_node_type_geo_attribute_map_range(), register_node_type_geo_attribute_math(), register_node_type_geo_attribute_mix(), register_node_type_geo_attribute_proximity(), register_node_type_geo_attribute_randomize(), register_node_type_geo_attribute_remove(), register_node_type_geo_attribute_separate_xyz(), register_node_type_geo_attribute_vector_math(), register_node_type_geo_boolean(), register_node_type_geo_bounding_box(), register_node_type_geo_collection_info(), register_node_type_geo_edge_split(), register_node_type_geo_is_viewport(), register_node_type_geo_join_geometry(), register_node_type_geo_mesh_primitive_circle(), register_node_type_geo_mesh_primitive_cone(), register_node_type_geo_mesh_primitive_cube(), register_node_type_geo_mesh_primitive_cylinder(), register_node_type_geo_mesh_primitive_grid(), register_node_type_geo_mesh_primitive_ico_sphere(), register_node_type_geo_mesh_primitive_line(), register_node_type_geo_mesh_primitive_uv_sphere(), register_node_type_geo_object_info(), register_node_type_geo_point_distribute(), register_node_type_geo_point_instance(), register_node_type_geo_point_rotate(), register_node_type_geo_point_scale(), register_node_type_geo_point_separate(), register_node_type_geo_point_translate(), register_node_type_geo_points_to_volume(), register_node_type_geo_sample_texture(), register_node_type_geo_subdivide(), register_node_type_geo_subdivision_surface(), register_node_type_geo_transform(), register_node_type_geo_triangulate(), and register_node_type_geo_volume_to_mesh().

◆ gpu_fn

NodeGPUExecFunction bNodeType::gpu_fn

Definition at line 321 of file BKE_node.h.

Referenced by node_type_gpu().

◆ group_update_func

void(* bNodeType::group_update_func) (struct bNodeTree *ntree, struct bNode *node)

Check and update if internal ID data has changed.

Definition at line 276 of file BKE_node.h.

Referenced by node_type_group_update().

◆ height

float bNodeType::height

Definition at line 232 of file BKE_node.h.

Referenced by node_init(), and node_type_base_defaults().

◆ idname

char bNodeType::idname[64]

◆ init_exec_fn

NodeInitExecFunction bNodeType::init_exec_fn

Definition at line 317 of file BKE_node.h.

Referenced by node_type_exec().

◆ initfunc

void(* bNodeType::initfunc) (struct bNodeTree *ntree, struct bNode *node)

Initialize a new node instance of this type after creation.

Definition at line 279 of file BKE_node.h.

Referenced by node_init(), and node_type_init().

◆ initfunc_api

void(* bNodeType::initfunc_api) (const struct bContext *C, struct PointerRNA *ptr)

◆ inputs

bNodeSocketTemplate* bNodeType::inputs

◆ insert_link

void(* bNodeType::insert_link) (struct bNodeTree *ntree, struct bNode *node, struct bNodeLink *link)

◆ labelfunc

void(* bNodeType::labelfunc) (struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen)

Optional custom label function for the node header.

Note
Used as a fallback when bNode.label isn't set.

Definition at line 265 of file BKE_node.h.

Referenced by node_type_label().

◆ maxheight

float bNodeType::maxheight

Definition at line 232 of file BKE_node.h.

Referenced by node_type_base_defaults().

◆ maxwidth

float bNodeType::maxwidth

Definition at line 231 of file BKE_node.h.

Referenced by node_type_size().

◆ minheight

float bNodeType::minheight

Definition at line 232 of file BKE_node.h.

Referenced by node_type_base_defaults().

◆ minwidth

float bNodeType::minwidth

Definition at line 231 of file BKE_node.h.

Referenced by node_type_size().

◆ nclass

short bNodeType::nclass

◆ next

void* bNodeType::next

Definition at line 222 of file BKE_node.h.

◆ outputs

bNodeSocketTemplate * bNodeType::outputs

◆ poll

bool(* bNodeType::poll) (struct bNodeType *ntype, struct bNodeTree *nodetree, const char **r_disabled_hint)

Can this node type be added to a node tree?

Parameters
r_disabled_hintOptional hint to display in the UI when the poll fails. The callback can set this to a static string without having to null-check it (or without setting it to null if it's not used). The caller must pass a valid const char ** and null-initialize it when it's not just a dummy, that is, if it actually wants to access the returned disabled-hint (null-check needed!).

Definition at line 301 of file BKE_node.h.

Referenced by cmp_node_type_base(), fn_node_type_base(), geo_node_type_base(), node_type_base(), nodeRegisterType(), register_node_type_cmp_cryptomatte(), register_node_type_cmp_custom_group(), register_node_type_cmp_group(), register_node_type_cmp_rlayers(), register_node_type_geo_custom_group(), register_node_type_geo_group(), register_node_type_sh_custom_group(), register_node_type_sh_group(), register_node_type_tex_group(), register_undefined_types(), sh_fn_node_type_base(), sh_node_type_base(), and tex_node_type_base().

◆ poll_instance

bool(* bNodeType::poll_instance) (struct bNode *node, struct bNodeTree *nodetree, const char **r_disabled_hint)

Can this node be added to a node tree?

Parameters
r_disabled_hintSee poll().

Definition at line 305 of file BKE_node.h.

Referenced by node_type_base(), register_node_type_cmp_group(), register_node_type_geo_group(), register_node_type_sh_group(), and register_node_type_tex_group().

◆ prev

void * bNodeType::prev

Definition at line 222 of file BKE_node.h.

◆ resize_area_func

int(* bNodeType::resize_area_func) (struct bNode *node, int x, int y)

Optional custom resize handle polling.

Definition at line 267 of file BKE_node.h.

Referenced by ED_init_custom_node_type(), ED_node_init_butfuncs(), and node_common_set_butfunc().

◆ rna_ext

ExtensionRNA bNodeType::rna_ext

◆ select_area_func

int(* bNodeType::select_area_func) (struct bNode *node, int x, int y)

Optional selection area polling.

Definition at line 269 of file BKE_node.h.

Referenced by ED_init_custom_node_type(), and ED_node_init_butfuncs().

◆ storagename

char bNodeType::storagename[64]

Definition at line 238 of file BKE_node.h.

Referenced by node_set_typeinfo(), and node_type_storage().

◆ tweak_area_func

int(* bNodeType::tweak_area_func) (struct bNode *node, int x, int y)

Optional tweak area polling (for grabbing).

Definition at line 271 of file BKE_node.h.

Referenced by ED_init_custom_node_type(), ED_node_init_butfuncs(), and node_common_set_butfunc().

◆ type

int bNodeType::type

◆ ui_description

char bNodeType::ui_description[256]

Definition at line 228 of file BKE_node.h.

◆ ui_icon

int bNodeType::ui_icon

Definition at line 229 of file BKE_node.h.

◆ ui_name

char bNodeType::ui_name[64]

◆ update_internal_links

void(* bNodeType::update_internal_links) (struct bNodeTree *, struct bNode *node)

◆ updatefunc

void(* bNodeType::updatefunc) (struct bNodeTree *ntree, struct bNode *node)

Called when the node is updated in the editor.

Definition at line 274 of file BKE_node.h.

Referenced by cmp_node_type_base(), node_type_update(), and register_node_type_geo_boolean().

◆ width

float bNodeType::width

Definition at line 231 of file BKE_node.h.

Referenced by node_init(), node_type_size(), and nodePositionRelative().


The documentation for this struct was generated from the following file: