62class NodeMultiFunctionBuilder;
63class GeoNodeExecParams;
65class NodeDeclarationBuilder;
66class GatherAddNodeSearchParams;
67class GatherLinkSearchOpParams;
68struct NodeExtraInfoParams;
135 void (*)(blender::nodes::GatherAddNodeSearchParams &
params);
273 int label_maxncpy) =
nullptr;
323 const char **r_disabled_hint) =
nullptr;
330 const char **r_disabled_hint) =
nullptr;
447#define NODE_CLASS_INPUT 0
448#define NODE_CLASS_OUTPUT 1
449#define NODE_CLASS_OP_COLOR 3
450#define NODE_CLASS_OP_VECTOR 4
451#define NODE_CLASS_OP_FILTER 5
452#define NODE_CLASS_GROUP 6
453#define NODE_CLASS_CONVERTER 8
454#define NODE_CLASS_MATTE 9
455#define NODE_CLASS_DISTORT 10
456#define NODE_CLASS_PATTERN 12
457#define NODE_CLASS_TEXTURE 13
458#define NODE_CLASS_SCRIPT 32
459#define NODE_CLASS_INTERFACE 33
460#define NODE_CLASS_SHADER 40
461#define NODE_CLASS_GEOMETRY 41
462#define NODE_CLASS_ATTRIBUTE 42
463#define NODE_CLASS_LAYOUT 100
515 ID **r_from) =
nullptr;
649 std::optional<int> dimensions = std::nullopt);
651 int type,
int subtype, std::optional<int> dimensions = std::nullopt);
682 std::optional<int> unique_identifier = std::nullopt);
699 Main *bmain,
bNodeTree &ntree,
bNode &node,
bool do_id_user,
bool remove_animation =
true);
781 const char **r_disabled_hint);
795 std::optional<StringRefNull> storagename,
796 void (*freefunc)(
bNode *node),
799 const bNode *src_node));
809#define NODE_UNDEFINED -2
810#define NODE_CUSTOM -1
813#define NODE_REROUTE 6
814#define NODE_GROUP_INPUT 7
815#define NODE_GROUP_OUTPUT 8
816#define NODE_CUSTOM_GROUP 9
818#define NODE_LEGACY_TYPE_GENERATION_START 5000
872#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id) \
874 blender::bke::NodeTreeIterStore _nstore; \
875 bNodeTree *_nodetree; \
878 blender::bke::node_tree_iterator_init(&_nstore, bmain); \
879 while (blender::bke::node_tree_iterator_step(&_nstore, &_nodetree, &_id) == true) { \
882#define FOREACH_NODETREE_END \
969 const bNode &node_src,
971 std::optional<StringRefNull> dst_unique_name,
972 std::optional<int> dst_unique_identifier,
974 bool allow_duplicate_names =
false);
1013 const bNode &to_node,
1032 const bNode *node_start,
1033 bool (*callback)(
bNode *,
bNode *,
void *,
const bool),
1153 std::optional<int16_t> legacy_type = std::nullopt);
1212 return const_cast<int &
>(
1235 return this->
idname == query_idname;
1240#define NODE_STORAGE_FUNCS(StorageT) \
1241 [[maybe_unused]] static StorageT &node_storage(bNode &node) \
1243 return *static_cast<StorageT *>(node.storage); \
1245 [[maybe_unused]] static const StorageT &node_storage(const bNode &node) \
1247 return *static_cast<const StorageT *>(node.storage); \
constexpr int GROUP_NODE_MIN_WIDTH
constexpr int GROUP_NODE_DEFAULT_WIDTH
constexpr int GROUP_NODE_MAX_WIDTH
constexpr int NODE_DEFAULT_MAX_WIDTH
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const bNode * get_corresponding_input(const bNodeTree &tree, const bNode &output_bnode) const
virtual const int & get_corresponding_output_id(const bNode &input_bnode) const =0
virtual ~bNodeZoneType()=default
const bNode * get_corresponding_output(const bNodeTree &tree, const bNode &input_bnode) const
std::string output_idname
void node_unregister_socket_type(bNodeSocketType &stype)
bNode * node_find_node_by_name(bNodeTree &ntree, StringRefNull name)
bNodeSocket * node_find_enabled_input_socket(bNode &node, StringRef name)
void node_position_propagate(bNode &node)
void node_chain_iterator_backwards(const bNodeTree *ntree, bNode *node_start, bool(*callback)(bNode *, bNode *, void *), void *userdata, int recursion_lvl)
NodeColorTag node_color_tag(const bNode &node)
void node_socket_declarations_update(bNode *node)
void node_tree_free_local_node(bNodeTree &ntree, bNode &node)
void node_tree_set_output(bNodeTree &ntree)
void(*)(blender::nodes::value_elem::InverseElemEvalParams ¶ms) NodeInverseElemEvalFunction
const bNodeZoneType * zone_type_by_node_type(const int node_type)
void node_modify_socket_type_static(bNodeTree *ntree, bNode *node, bNodeSocket *sock, int type, int subtype)
StringRefNull node_type_find_alias(StringRefNull alias)
bNodeSocketType NodeSocketTypeUndefined
std::string node_label(const bNodeTree &ntree, const bNode &node)
std::optional< eNodeSocketDatatype > geo_nodes_base_cpp_type_to_socket_type(const CPPType &type)
void(*)(const void *socket_value, void *r_value) SocketGetCPPValueFunction
void(*)(blender::nodes::GatherAddNodeSearchParams ¶ms) NodeGatherAddOperationsFunction
void node_tree_remove_layer_n(bNodeTree *ntree, Scene *scene, int layer_index)
bool node_is_parent_and_child(const bNode &parent, const bNode &child)
void node_attach_node(bNodeTree &ntree, bNode &node, bNode &parent)
void node_tree_blend_read_data(BlendDataReader *reader, ID *owner_id, bNodeTree *ntree)
const bNodeTreeInterfaceSocket * node_find_interface_input_by_identifier(const bNodeTree &ntree, StringRef identifier)
void node_register_alias(bNodeType &nt, StringRef alias)
bool node_tree_is_registered(const bNodeTree &ntree)
bNodeTreeType * node_tree_type_find(StringRef idname)
void node_unlink_node(bNodeTree &ntree, bNode &node)
void node_tree_free_tree(bNodeTree &ntree)
Span< bNodeSocketType * > node_socket_types_get()
void node_tag_update_id(bNode &node)
bNodeTree * node_tree_add_tree_embedded(Main *bmain, ID *owner_id, StringRefNull name, StringRefNull idname)
std::optional< VolumeGridType > socket_type_to_grid_type(eNodeSocketDatatype type)
bool node_is_connected_to_output(const bNodeTree &ntree, const bNode &node)
bNodeTree * node_tree_copy_tree(Main *bmain, const bNodeTree &ntree)
bNodeSocket * node_find_socket(bNode &node, eNodeSocketInOut in_out, StringRef identifier)
void node_remove_node(Main *bmain, bNodeTree &ntree, bNode &node, bool do_id_user, bool remove_animation=true)
bool node_socket_is_registered(const bNodeSocket &sock)
bool node_tree_iterator_step(NodeTreeIterStore *ntreeiter, bNodeTree **r_nodetree, ID **r_id)
void node_internal_links(bNode &node, bNodeLink **r_links, int *r_len)
bNode * node_add_node(const bContext *C, bNodeTree &ntree, StringRef idname, std::optional< int > unique_identifier=std::nullopt)
bNode * node_get_active(bNodeTree &ntree)
void node_tree_blend_write(BlendWriter *writer, bNodeTree *ntree)
bool node_link_is_selected(const bNodeLink &link)
void node_remove_socket(bNodeTree &ntree, bNode &node, bNodeSocket &sock)
void node_update_asset_metadata(bNodeTree &node_tree)
void(*)(blender::nodes::GeoNodeExecParams params) NodeGeometryExecFunction
bool node_group_poll(const bNodeTree *nodetree, const bNodeTree *grouptree, const char **r_disabled_hint)
void node_unique_id(bNodeTree &ntree, bNode &node)
void node_type_size(bNodeType &ntype, int width, int minwidth, int maxwidth)
Span< int > all_zone_output_node_types()
void(*)(blender::nodes::NodeExtraInfoParams ¶ms) NodeExtraInfoFunction
void node_register_type(bNodeType &ntype)
void *(*)(bNodeExecContext *context, bNode *node, bNodeInstanceKey key) NodeInitExecFunction
int(*)( GPUMaterial *mat, bNode *node, bNodeExecData *execdata, GPUNodeStack *in, GPUNodeStack *out) NodeGPUExecFunction
std::optional< StringRefNull > node_socket_short_label(const bNodeSocket &sock)
void node_set_socket_availability(bNodeTree &ntree, bNodeSocket &sock, bool is_available)
const char * node_socket_translation_context(const bNodeSocket &sock)
void node_remove_link(bNodeTree *ntree, bNodeLink &link)
SocketValueVariant(*)(const void *socket_value) SocketGetGeometryNodesCPPValueFunction
void node_chain_iterator(const bNodeTree *ntree, const bNode *node_start, bool(*callback)(bNode *, bNode *, void *, const bool), void *userdata, bool reversed)
const bNodeSocket *(*)(const bNodeTree &tree, const bNode &node, const bNodeSocket &output_socket) NodeInternallyLinkedInputFunction
Span< bNodeType * > node_types_get()
bool node_is_dangling_reroute(const bNodeTree &ntree, const bNode &node)
std::optional< StringRefNull > node_static_socket_interface_type_new(int type, int subtype, std::optional< int > dimensions=std::nullopt)
bNode * node_get_active_texture(bNodeTree &ntree)
void node_tree_local_merge(Main *bmain, bNodeTree *localtree, bNodeTree *ntree)
void node_tree_set_type(bNodeTree &ntree)
bool node_declaration_ensure_on_outdated_node(bNodeTree &ntree, bNode &node)
void node_tree_type_add(bNodeTreeType &nt)
void node_tree_update_all_new(Main &main)
void(*)(blender::nodes::NodeDeclarationBuilder &builder) NodeDeclareFunction
void node_type_base(bNodeType &ntype, std::string idname, std::optional< int16_t > legacy_type=std::nullopt)
bNodePreview * node_preview_verify(Map< bNodeInstanceKey, bNodePreview > &previews, bNodeInstanceKey key, int xsize, int ysize, bool create)
void node_tree_iterator_init(NodeTreeIterStore *ntreeiter, Main *bmain)
std::optional< eNodeSocketDatatype > grid_type_to_socket_type(VolumeGridType type)
void node_node_foreach_id(bNode *node, LibraryForeachIDData *data)
bNodeTreeType NodeTreeTypeUndefined
bNodeTree ** node_tree_ptr_from_id(ID *id)
bNodeTree * node_tree_localize(bNodeTree *ntree, std::optional< ID * > new_owner_id)
void node_parents_iterator(bNode *node, bool(*callback)(bNode *, void *), void *userdata)
void node_unlink_attached(bNodeTree *ntree, const bNode *parent)
int node_count_socket_links(const bNodeTree &ntree, const bNodeSocket &sock)
void node_internal_relink(bNodeTree &ntree, bNode &node)
bNode * node_find_node_try(bNodeTree &ntree, bNodeSocket &socket)
void(*)(void *data, bNode *node, bNodeSocket *out) NodeMaterialXFunction
const bNodeInstanceKey NODE_INSTANCE_KEY_BASE
std::optional< eNodeSocketDatatype > custom_data_type_to_socket_type(eCustomDataType type)
void node_free_node(bNodeTree *tree, bNode &node)
void(*)(bNodeTree &tree, bNode &node, BlendDataReader &reader) NodeBlendDataReadFunction
void node_preview_remove_unused(bNodeTree *ntree)
bool node_preview_used(const bNode &node)
void(*)(void *calldata, int nclass, StringRefNull name) bNodeClassCallback
bNodeType NodeTypeUndefined
void node_tree_type_free_link(const bNodeTreeType &nt)
void node_type_socket_templates(bNodeType *ntype, bNodeSocketTemplate *inputs, bNodeSocketTemplate *outputs)
bNodeInstanceKey node_instance_key(bNodeInstanceKey parent_key, const bNodeTree *ntree, const bNode *node)
void(*)(const bNodeTree &tree, const bNode &node, blender::nodes::NodeDeclarationBuilder &builder) NodeDeclareDynamicFunction
void node_register_socket_type(bNodeSocketType &stype)
void node_preview_merge_tree(bNodeTree *to_ntree, bNodeTree *from_ntree, bool remove_old)
void(*)(blender::nodes::GatherLinkSearchOpParams ¶ms) NodeGatherSocketLinkOperationsFunction
bNodeSocket * node_find_enabled_output_socket(bNode &node, StringRef name)
const CPPType * socket_type_to_geo_nodes_base_cpp_type(eNodeSocketDatatype type)
bNode * node_get_active_paint_canvas(bNodeTree &ntree)
void node_position_relative(bNode &from_node, const bNode &to_node, const bNodeSocket *from_sock, const bNodeSocket &to_sock)
Span< const bNodeZoneType * > all_zone_types()
bool node_set_selected(bNode &node, bool select)
bNodeSocket * node_add_socket(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out, StringRefNull idname, StringRefNull identifier, StringRefNull name)
bNode & node_find_node(bNodeTree &ntree, bNodeSocket &socket)
bool node_tree_contains_tree(const bNodeTree &tree_to_search_in, const bNodeTree &tree_to_search_for)
void node_detach_node(bNodeTree &ntree, bNode &node)
void node_preview_init_tree(bNodeTree *ntree, int xsize, int ysize)
void node_rebuild_id_vector(bNodeTree &node_tree)
bNodeSocketType * node_socket_type_find(StringRef idname)
bNode * node_add_static_node(const bContext *C, bNodeTree &ntree, int type)
Span< int > all_zone_node_types()
bNodeTree * node_tree_copy_tree_ex(const bNodeTree &ntree, Main *bmain, bool do_id_user)
bool node_supports_active_flag(const bNode &node, int sub_activity)
Does the given node supports the sub active flag.
bNodeLink & node_add_link(bNodeTree &ntree, bNode &fromnode, bNodeSocket &fromsock, bNode &tonode, bNodeSocket &tosock)
void register_node_zone_type(const bNodeZoneType &zone_type)
bNodeSocket * node_find_enabled_socket(bNode &node, eNodeSocketInOut in_out, StringRef name)
Span< int > all_zone_input_node_types()
bNodeTree * node_tree_add_tree(Main *bmain, StringRef name, StringRef idname)
void(*)(blender::nodes::value_elem::ElemEvalParams ¶ms) NodeElemEvalFunction
bNodeSocketType * node_socket_type_find_static(int type, int subtype=0)
void node_link_set_mute(bNodeTree &ntree, bNodeLink &link, const bool muted)
void(*)(blender::nodes::inverse_eval::InverseEvalParams ¶ms) NodeInverseEvalFunction
StringRefNull node_socket_type_label(const bNodeSocketType &stype)
Span< bNodeTreeType * > node_tree_types_get()
bNodeSocket * node_add_static_socket(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out, int type, int subtype, StringRefNull identifier, StringRefNull name)
void(*)(const bNodeTree &tree, const bNode &node, BlendWriter &writer) NodeBlendWriteFunction
void(*)(blender::nodes::NodeMultiFunctionBuilder &builder) NodeMultiFunctionBuildFunction
void node_remove_socket_ex(bNodeTree &ntree, bNode &node, bNodeSocket &sock, bool do_id_user)
void node_unregister_type(bNodeType &ntype)
void node_modify_socket_type(bNodeTree &ntree, bNode &node, bNodeSocket &sock, StringRefNull idname)
bNode * node_copy_with_mapping(bNodeTree *dst_tree, const bNode &node_src, int flag, std::optional< StringRefNull > dst_unique_name, std::optional< int > dst_unique_identifier, Map< const bNodeSocket *, bNodeSocket * > &new_socket_map, bool allow_duplicate_names=false)
std::optional< StringRefNull > node_static_socket_label(int type, int subtype)
void(*)(void *nodedata) NodeFreeExecFunction
std::optional< StringRefNull > node_static_socket_type(int type, int subtype, std::optional< int > dimensions=std::nullopt)
void node_remove_socket_links(bNodeTree &ntree, bNodeSocket &sock)
const bNodeInstanceKey NODE_INSTANCE_KEY_NONE
bool node_declaration_ensure(bNodeTree &ntree, bNode &node)
void node_set_active(bNodeTree &ntree, bNode &node)
float2 node_dimensions_get(const bNode &node)
bNodeTree * node_tree_add_in_lib(Main *bmain, Library *owner_library, StringRefNull name, StringRefNull idname)
bNodeType * node_type_find(StringRef idname)
blender::compositor::NodeOperation *(*)(blender::compositor::Context &context, blender::nodes::DNode node) NodeGetCompositorOperationFunction
void node_socket_move_default_value(Main &bmain, bNodeTree &tree, bNodeSocket &src, bNodeSocket &dst)
bNodeTree * node_tree_from_id(ID *id)
void node_tree_update_all_users(Main *main, ID *id)
int node_socket_link_limit(const bNodeSocket &sock)
void node_clear_active(bNodeTree &ntree)
StringRefNull node_socket_sub_type_label(int subtype)
bNode * node_find_root_parent(bNode &node)
StringRefNull node_socket_label(const bNodeSocket &sock)
void(*)( void *data, int thread, bNode *, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out) NodeExecFunction
void node_tree_free_embedded_tree(bNodeTree *ntree)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
std::optional< eCustomDataType > socket_type_to_custom_data_type(eNodeSocketDatatype type)
void node_type_size_preset(bNodeType &ntype, eNodeSizePreset size)
void node_unique_name(bNodeTree &ntree, bNode &node)
bool node_is_static_socket_type(const bNodeSocketType &stype)
bool node_link_is_hidden(const bNodeLink &link)
void node_type_base_custom(bNodeType &ntype, StringRefNull idname, StringRefNull name, StringRefNull enum_name, short nclass)
void node_tree_node_flag_set(bNodeTree &ntree, int flag, bool enable)
VecBase< float, 2 > float2
static blender::bke::bNodeSocketTemplate outputs[]
static blender::bke::bNodeSocketTemplate inputs[]
FreestyleLineStyle * linestyle
Compact definition of a node socket.
ExtensionRNA ext_interface
SocketGetCPPValueFunction get_base_cpp_value
std::string subtype_label
void(* draw_color)(bContext *C, PointerRNA *ptr, PointerRNA *node_ptr, float *r_color)
void(* interface_init_socket)(ID *id, const bNodeTreeInterfaceSocket *interface_socket, bNode *node, bNodeSocket *socket, StringRefNull data_path)
void(* free_self)(bNodeSocketType *stype)
void(* draw_color_simple)(const bNodeSocketType *socket_type, float *r_color)
bool use_link_limits_of_type
void(* interface_draw)(ID *id, bNodeTreeInterfaceSocket *socket, bContext *C, uiLayout *layout)
void(* draw)(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr, StringRef text)
SocketGetGeometryNodesCPPValueFunction get_geometry_nodes_cpp_value
const SocketValueVariant * geometry_nodes_default_value
const blender::CPPType * base_cpp_type
void(* interface_from_socket)(ID *id, bNodeTreeInterfaceSocket *interface_socket, const bNode *node, const bNodeSocket *socket)
void(* update)(bNodeTree *ntree)
void(* foreach_nodeclass)(void *calldata, bNodeClassCallback func)
void(* node_add_init)(bNodeTree *ntree, bNode *bnode)
std::string ui_description
bool(* poll)(const bContext *C, bNodeTreeType *ntreetype)
void(* get_from_context)(const bContext *C, bNodeTreeType *ntreetype, bNodeTree **r_ntree, ID **r_id, ID **r_from)
void(* localize)(bNodeTree *localtree, bNodeTree *ntree)
void(* local_merge)(Main *bmain, bNodeTree *localtree, bNodeTree *ntree)
bool(* validate_link)(eNodeSocketDatatype from, eNodeSocketDatatype to)
uint8_t no_group_interface
bool(* valid_socket_type)(bNodeTreeType *ntreetype, bNodeSocketType *socket_type)
NodeInverseElemEvalFunction eval_inverse_elem
blender::nodes::NodeDeclaration * static_declaration
void(* freefunc_api)(PointerRNA *ptr)
void(* copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)
NodeMaterialXFunction materialx_fn
NodeFreeExecFunction free_exec_fn
NodeInternallyLinkedInputFunction internally_linked_input
NodeInverseEvalFunction eval_inverse
NodeBlendWriteFunction blend_write_storage_content
std::string ui_description
bool is_type(StringRef query_idname) const
NodeBlendDataReadFunction blend_data_read_storage_content
NodeGetCompositorOperationFunction get_compositor_operation
int(* ui_class)(const bNode *node)
bool(* add_ui_poll)(const bContext *C)
void(* freefunc)(bNode *node)
void(* initfunc)(bNodeTree *ntree, bNode *node)
bool(* poll_instance)(const bNode *node, const bNodeTree *nodetree, const char **r_disabled_hint)
bNodeSocketTemplate * inputs
void(* labelfunc)(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy)
NodeGPUExecFunction gpu_fn
NodeElemEvalFunction eval_elem
void(* draw_backdrop)(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
void(* draw_buttons_ex)(uiLayout *, bContext *C, PointerRNA *ptr)
std::string(* ui_description_fn)(const bNode &node)
NodeMultiFunctionBuildFunction build_multi_function
NodeExtraInfoFunction get_extra_info
NodeGeometryExecFunction geometry_node_execute
const char * deprecation_notice
bNodeSocketTemplate * outputs
const char * enum_name_legacy
bool(* can_sync_sockets)(const bContext &C, const bNodeTree &tree, const bNode &node)
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
bool(* insert_link)(NodeInsertLinkParams ¶ms)
bool(* poll)(const bNodeType *ntype, const bNodeTree *nodetree, const char **r_disabled_hint)
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
void(* copyfunc_api)(PointerRNA *ptr, const bNode *src_node)
NodeDeclareFunction declare
void(* register_operators)()
void(* free_self)(bNodeType *ntype)
NodeInitExecFunction init_exec_fn
void(* updatefunc)(bNodeTree *ntree, bNode *node)
bool ignore_inferred_input_socket_visibility
void(* initfunc_api)(const bContext *C, PointerRNA *ptr)