Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_node.h
| Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | void (*copyfunc)(struct bNodeTree *dest_ntree, | ||||
| struct bNode *dest_node, | struct bNode *dest_node, | ||||
| const struct bNode *src_node); | const struct bNode *src_node); | ||||
| /* Registerable API callback versions, called in addition to C callbacks */ | /* Registerable API callback versions, called in addition to C callbacks */ | ||||
| void (*initfunc_api)(const struct bContext *C, struct PointerRNA *ptr); | void (*initfunc_api)(const struct bContext *C, struct PointerRNA *ptr); | ||||
| void (*freefunc_api)(struct PointerRNA *ptr); | void (*freefunc_api)(struct PointerRNA *ptr); | ||||
| void (*copyfunc_api)(struct PointerRNA *ptr, const struct bNode *src_node); | void (*copyfunc_api)(struct PointerRNA *ptr, const struct bNode *src_node); | ||||
| /* can this node type be added to a node tree */ | /** | ||||
| bool (*poll)(struct bNodeType *ntype, struct bNodeTree *nodetree); | * Can this node type be added to a node tree? | ||||
| /* can this node be added to a node tree */ | * \param r_disabled_hint: Optional hint to display in the UI when the poll fails. | ||||
| bool (*poll_instance)(struct bNode *node, struct bNodeTree *nodetree); | * 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!). | |||||
| */ | |||||
| bool (*poll)(struct bNodeType *ntype, struct bNodeTree *nodetree, const char **r_disabled_hint); | |||||
| /** Can this node be added to a node tree? | |||||
| * \param r_disabled_hint: See `poll()`. | |||||
| */ | |||||
| bool (*poll_instance)(struct bNode *node, | |||||
| struct bNodeTree *nodetree, | |||||
| const char **r_disabled_hint); | |||||
| /* optional handling of link insertion */ | /* optional handling of link insertion */ | ||||
| void (*insert_link)(struct bNodeTree *ntree, struct bNode *node, struct bNodeLink *link); | void (*insert_link)(struct bNodeTree *ntree, struct bNode *node, struct bNodeLink *link); | ||||
| /* Update the internal links list, for muting and disconnect operators. */ | /* Update the internal links list, for muting and disconnect operators. */ | ||||
| void (*update_internal_links)(struct bNodeTree *, struct bNode *node); | void (*update_internal_links)(struct bNodeTree *, struct bNode *node); | ||||
| void (*free_self)(struct bNodeType *ntype); | void (*free_self)(struct bNodeType *ntype); | ||||
| ▲ Show 20 Lines • Show All 495 Lines • ▼ Show 20 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Node Type Access | /** \name Node Type Access | ||||
| * \{ */ | * \{ */ | ||||
| void nodeLabel(struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen); | void nodeLabel(struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen); | ||||
| const char *nodeSocketLabel(const struct bNodeSocket *sock); | const char *nodeSocketLabel(const struct bNodeSocket *sock); | ||||
| int nodeGroupPoll(struct bNodeTree *nodetree, struct bNodeTree *grouptree); | bool nodeGroupPoll(struct bNodeTree *nodetree, | ||||
| struct bNodeTree *grouptree, | |||||
| const char **r_disabled_hint); | |||||
| /* Init a new node type struct with default values and callbacks */ | /* Init a new node type struct with default values and callbacks */ | ||||
| void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag); | void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag); | ||||
| void node_type_base_custom( | void node_type_base_custom( | ||||
| struct bNodeType *ntype, const char *idname, const char *name, short nclass, short flag); | struct bNodeType *ntype, const char *idname, const char *name, short nclass, short flag); | ||||
| void node_type_socket_templates(struct bNodeType *ntype, | void node_type_socket_templates(struct bNodeType *ntype, | ||||
| struct bNodeSocketTemplate *inputs, | struct bNodeSocketTemplate *inputs, | ||||
| struct bNodeSocketTemplate *outputs); | struct bNodeSocketTemplate *outputs); | ||||
| ▲ Show 20 Lines • Show All 578 Lines • ▼ Show 20 Lines | |||||
| #define GEO_NODE_MESH_PRIMITIVE_CYLINDER 1035 | #define GEO_NODE_MESH_PRIMITIVE_CYLINDER 1035 | ||||
| #define GEO_NODE_MESH_PRIMITIVE_ICO_SPHERE 1036 | #define GEO_NODE_MESH_PRIMITIVE_ICO_SPHERE 1036 | ||||
| #define GEO_NODE_MESH_PRIMITIVE_CONE 1037 | #define GEO_NODE_MESH_PRIMITIVE_CONE 1037 | ||||
| #define GEO_NODE_MESH_PRIMITIVE_LINE 1038 | #define GEO_NODE_MESH_PRIMITIVE_LINE 1038 | ||||
| #define GEO_NODE_MESH_PRIMITIVE_GRID 1039 | #define GEO_NODE_MESH_PRIMITIVE_GRID 1039 | ||||
| #define GEO_NODE_ATTRIBUTE_MAP_RANGE 1040 | #define GEO_NODE_ATTRIBUTE_MAP_RANGE 1040 | ||||
| #define GEO_NODE_ATTRIBUTE_CLAMP 1041 | #define GEO_NODE_ATTRIBUTE_CLAMP 1041 | ||||
| #define GEO_NODE_BOUNDING_BOX 1042 | #define GEO_NODE_BOUNDING_BOX 1042 | ||||
| #define GEO_NODE_SWITCH 1043 | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Function Nodes | /** \name Function Nodes | ||||
| * \{ */ | * \{ */ | ||||
| #define FN_NODE_BOOLEAN_MATH 1200 | #define FN_NODE_BOOLEAN_MATH 1200 | ||||
| Show All 25 Lines | |||||