Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_node.h
| Show First 20 Lines • Show All 219 Lines • ▼ Show 20 Lines | typedef struct bNodeType { | ||||
| /// Check and update if internal ID data has changed. | /// Check and update if internal ID data has changed. | ||||
| void (*group_update_func)(struct bNodeTree *ntree, struct bNode *node); | void (*group_update_func)(struct bNodeTree *ntree, struct bNode *node); | ||||
| /// Initialize a new node instance of this type after creation. | /// Initialize a new node instance of this type after creation. | ||||
| void (*initfunc)(struct bNodeTree *ntree, struct bNode *node); | void (*initfunc)(struct bNodeTree *ntree, struct bNode *node); | ||||
| /// Free the node instance. | /// Free the node instance. | ||||
| void (*freefunc)(struct bNode *node); | void (*freefunc)(struct bNode *node); | ||||
| /// Make a copy of the node instance. | /// Make a copy of the node instance. | ||||
| void (*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, struct bNode *src_node); | void (*copyfunc)(struct bNodeTree *dest_ntree, | ||||
| struct bNode *dest_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, 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 */ | /* can this node type be added to a node tree */ | ||||
| bool (*poll)(struct bNodeType *ntype, struct bNodeTree *nodetree); | bool (*poll)(struct bNodeType *ntype, struct bNodeTree *nodetree); | ||||
| /* can this node be added to a node tree */ | /* can this node be added to a node tree */ | ||||
| bool (*poll_instance)(struct bNode *node, struct bNodeTree *nodetree); | bool (*poll_instance)(struct bNode *node, struct bNodeTree *nodetree); | ||||
| /* 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); | ||||
| ▲ Show 20 Lines • Show All 291 Lines • ▼ Show 20 Lines | |||||
| void nodeUniqueName(struct bNodeTree *ntree, struct bNode *node); | void nodeUniqueName(struct bNodeTree *ntree, struct bNode *node); | ||||
| /* Delete node, associated animation data and ID user count. */ | /* Delete node, associated animation data and ID user count. */ | ||||
| void nodeRemoveNode(struct Main *bmain, | void nodeRemoveNode(struct Main *bmain, | ||||
| struct bNodeTree *ntree, | struct bNodeTree *ntree, | ||||
| struct bNode *node, | struct bNode *node, | ||||
| bool do_id_user); | bool do_id_user); | ||||
| struct bNode *BKE_node_copy_ex(struct bNodeTree *ntree, struct bNode *node_src, const int flag); | struct bNode *BKE_node_copy_ex(struct bNodeTree *ntree, | ||||
| const struct bNode *node_src, | |||||
| const int flag); | |||||
| /* Same as BKE_node_copy_ex() but stores pointers to a new node and its sockets in the source | |||||
| * node. | |||||
| * | |||||
| * NOTE: DANGER ZONE! | |||||
| * | |||||
| * TODO(sergey): Maybe it's better to make BKE_node_copy_ex() return a mapping from old node and | |||||
| * sockets to new one. */ | |||||
| struct bNode *BKE_node_copy_store_new_pointers(struct bNodeTree *ntree, | |||||
| struct bNode *node_src, | |||||
| const int flag); | |||||
| struct bNodeLink *nodeAddLink(struct bNodeTree *ntree, | struct bNodeLink *nodeAddLink(struct bNodeTree *ntree, | ||||
| struct bNode *fromnode, | struct bNode *fromnode, | ||||
| struct bNodeSocket *fromsock, | struct bNodeSocket *fromsock, | ||||
| struct bNode *tonode, | struct bNode *tonode, | ||||
| struct bNodeSocket *tosock); | struct bNodeSocket *tosock); | ||||
| void nodeRemLink(struct bNodeTree *ntree, struct bNodeLink *link); | void nodeRemLink(struct bNodeTree *ntree, struct bNodeLink *link); | ||||
| void nodeRemSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock); | void nodeRemSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock); | ||||
| ▲ Show 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | |||||
| void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size); | void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size); | ||||
| void node_type_init(struct bNodeType *ntype, | void node_type_init(struct bNodeType *ntype, | ||||
| void (*initfunc)(struct bNodeTree *ntree, struct bNode *node)); | void (*initfunc)(struct bNodeTree *ntree, struct bNode *node)); | ||||
| void node_type_storage(struct bNodeType *ntype, | void node_type_storage(struct bNodeType *ntype, | ||||
| const char *storagename, | const char *storagename, | ||||
| void (*freefunc)(struct bNode *node), | void (*freefunc)(struct bNode *node), | ||||
| void (*copyfunc)(struct bNodeTree *dest_ntree, | void (*copyfunc)(struct bNodeTree *dest_ntree, | ||||
| struct bNode *dest_node, | struct bNode *dest_node, | ||||
| struct bNode *src_node)); | const struct bNode *src_node)); | ||||
| void node_type_label( | void node_type_label( | ||||
| struct bNodeType *ntype, | struct bNodeType *ntype, | ||||
| void (*labelfunc)(struct bNodeTree *ntree, struct bNode *, char *label, int maxlen)); | void (*labelfunc)(struct bNodeTree *ntree, struct bNode *, char *label, int maxlen)); | ||||
| void node_type_update(struct bNodeType *ntype, | void node_type_update(struct bNodeType *ntype, | ||||
| void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node)); | void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node)); | ||||
| void node_type_group_update(struct bNodeType *ntype, | void node_type_group_update(struct bNodeType *ntype, | ||||
| void (*group_update_func)(struct bNodeTree *ntree, | void (*group_update_func)(struct bNodeTree *ntree, | ||||
| struct bNode *node)); | struct bNode *node)); | ||||
| ▲ Show 20 Lines • Show All 518 Lines • Show Last 20 Lines | |||||