Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_node.h
| Show First 20 Lines • Show All 408 Lines • ▼ Show 20 Lines | typedef struct bNodeTreeType { | ||||
| void (*get_from_context)(const struct bContext *C, | void (*get_from_context)(const struct bContext *C, | ||||
| struct bNodeTreeType *ntreetype, | struct bNodeTreeType *ntreetype, | ||||
| struct bNodeTree **r_ntree, | struct bNodeTree **r_ntree, | ||||
| struct ID **r_id, | struct ID **r_id, | ||||
| struct ID **r_from); | struct ID **r_from); | ||||
| /* calls allowing threaded composite */ | /* calls allowing threaded composite */ | ||||
| void (*localize)(struct bNodeTree *localtree, struct bNodeTree *ntree); | void (*localize)(struct bNodeTree *localtree, struct bNodeTree *ntree); | ||||
| void (*local_sync)(struct bNodeTree *localtree, struct bNodeTree *ntree); | |||||
| void (*local_merge)(struct Main *bmain, struct bNodeTree *localtree, struct bNodeTree *ntree); | void (*local_merge)(struct Main *bmain, struct bNodeTree *localtree, struct bNodeTree *ntree); | ||||
| /* Tree update. Overrides `nodetype->updatetreefunc` ! */ | /* Tree update. Overrides `nodetype->updatetreefunc` ! */ | ||||
| void (*update)(struct bNodeTree *ntree); | void (*update)(struct bNodeTree *ntree); | ||||
| bool (*validate_link)(eNodeSocketDatatype from, eNodeSocketDatatype to); | bool (*validate_link)(eNodeSocketDatatype from, eNodeSocketDatatype to); | ||||
| void (*node_add_init)(struct bNodeTree *ntree, struct bNode *bnode); | void (*node_add_init)(struct bNodeTree *ntree, struct bNode *bnode); | ||||
| ▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | |||||
| void ntreeFreeCache(struct bNodeTree *ntree); | void ntreeFreeCache(struct bNodeTree *ntree); | ||||
| void ntreeNodeFlagSet(const bNodeTree *ntree, const int flag, const bool enable); | void ntreeNodeFlagSet(const bNodeTree *ntree, const int flag, const bool enable); | ||||
| /** | /** | ||||
| * Returns localized tree for execution in threads. | * Returns localized tree for execution in threads. | ||||
| */ | */ | ||||
| struct bNodeTree *ntreeLocalize(struct bNodeTree *ntree); | struct bNodeTree *ntreeLocalize(struct bNodeTree *ntree); | ||||
| /** | /** | ||||
| * Sync local composite with real tree. | |||||
| * The local tree is supposed to be running, be careful moving previews! | |||||
| * | |||||
| * Is called by jobs manager, outside threads, so it doesn't happen during draw. | |||||
| */ | |||||
| void ntreeLocalSync(struct bNodeTree *localtree, struct bNodeTree *ntree); | |||||
| /** | |||||
| * Merge local tree results back, and free local tree. | * Merge local tree results back, and free local tree. | ||||
| * | * | ||||
| * We have to assume the editor already changed completely. | * We have to assume the editor already changed completely. | ||||
| */ | */ | ||||
| void ntreeLocalMerge(struct Main *bmain, struct bNodeTree *localtree, struct bNodeTree *ntree); | void ntreeLocalMerge(struct Main *bmain, struct bNodeTree *localtree, struct bNodeTree *ntree); | ||||
| /** | /** | ||||
| * This is only direct data, tree itself should have been written. | * This is only direct data, tree itself should have been written. | ||||
| ▲ Show 20 Lines • Show All 406 Lines • ▼ Show 20 Lines | |||||
| bNodePreview *BKE_node_preview_copy(struct bNodePreview *preview); | bNodePreview *BKE_node_preview_copy(struct bNodePreview *preview); | ||||
| void BKE_node_preview_free(struct bNodePreview *preview); | void BKE_node_preview_free(struct bNodePreview *preview); | ||||
| void BKE_node_preview_init_tree(struct bNodeTree *ntree, int xsize, int ysize); | void BKE_node_preview_init_tree(struct bNodeTree *ntree, int xsize, int ysize); | ||||
| void BKE_node_preview_free_tree(struct bNodeTree *ntree); | void BKE_node_preview_free_tree(struct bNodeTree *ntree); | ||||
| void BKE_node_preview_remove_unused(struct bNodeTree *ntree); | void BKE_node_preview_remove_unused(struct bNodeTree *ntree); | ||||
| void BKE_node_preview_clear(struct bNodePreview *preview); | void BKE_node_preview_clear(struct bNodePreview *preview); | ||||
| void BKE_node_preview_clear_tree(struct bNodeTree *ntree); | void BKE_node_preview_clear_tree(struct bNodeTree *ntree); | ||||
| void BKE_node_preview_sync_tree(struct bNodeTree *to_ntree, struct bNodeTree *from_ntree); | |||||
| void BKE_node_preview_merge_tree(struct bNodeTree *to_ntree, | void BKE_node_preview_merge_tree(struct bNodeTree *to_ntree, | ||||
| struct bNodeTree *from_ntree, | struct bNodeTree *from_ntree, | ||||
| bool remove_old); | bool remove_old); | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Node Type Access | /** \name Node Type Access | ||||
| * \{ */ | * \{ */ | ||||
| void nodeLabel(const struct bNodeTree *ntree, const struct bNode *node, char *label, int maxlen); | void nodeLabel(const struct bNodeTree *ntree, const struct bNode *node, char *label, int maxlen); | ||||
| /** | /** | ||||
| * Get node socket label if it is set. | * Get node socket label if it is set. | ||||
| */ | */ | ||||
| const char *nodeSocketLabel(const struct bNodeSocket *sock); | const char *nodeSocketLabel(const struct bNodeSocket *sock); | ||||
| bool nodeGroupPoll(struct bNodeTree *nodetree, | bool nodeGroupPoll(struct bNodeTree *nodetree, | ||||
| struct bNodeTree *grouptree, | struct bNodeTree *grouptree, | ||||
| const char **r_disabled_hint); | const char **r_disabled_hint); | ||||
| /** | /** | ||||
| * Initialize a new node type struct with default values and callbacks. | * Initialize 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); | ||||
| void node_type_base_custom( | void node_type_base_custom(struct bNodeType *ntype, | ||||
| struct bNodeType *ntype, const char *idname, const char *name, short nclass, short flag); | const char *idname, | ||||
| const char *name, | |||||
| short nclass); | |||||
| 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); | ||||
| void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth); | void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth); | ||||
| 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)); | ||||
| /** | /** | ||||
| ▲ Show 20 Lines • Show All 718 Lines • ▼ Show 20 Lines | |||||
| #define GEO_NODE_INPUT_MESH_EDGE_VERTICES 1138 | #define GEO_NODE_INPUT_MESH_EDGE_VERTICES 1138 | ||||
| #define GEO_NODE_INPUT_MESH_FACE_AREA 1139 | #define GEO_NODE_INPUT_MESH_FACE_AREA 1139 | ||||
| #define GEO_NODE_INPUT_MESH_FACE_NEIGHBORS 1140 | #define GEO_NODE_INPUT_MESH_FACE_NEIGHBORS 1140 | ||||
| #define GEO_NODE_INPUT_MESH_VERTEX_NEIGHBORS 1141 | #define GEO_NODE_INPUT_MESH_VERTEX_NEIGHBORS 1141 | ||||
| #define GEO_NODE_GEOMETRY_TO_INSTANCE 1142 | #define GEO_NODE_GEOMETRY_TO_INSTANCE 1142 | ||||
| #define GEO_NODE_INPUT_MESH_EDGE_NEIGHBORS 1143 | #define GEO_NODE_INPUT_MESH_EDGE_NEIGHBORS 1143 | ||||
| #define GEO_NODE_INPUT_MESH_ISLAND 1144 | #define GEO_NODE_INPUT_MESH_ISLAND 1144 | ||||
| #define GEO_NODE_INPUT_SCENE_TIME 1145 | #define GEO_NODE_INPUT_SCENE_TIME 1145 | ||||
| #define GEO_NODE_ACCUMULATE_FIELD 1146 | |||||
| #define GEO_NODE_INPUT_MESH_EDGE_ANGLE 1147 | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Function Nodes | /** \name Function Nodes | ||||
| * \{ */ | * \{ */ | ||||
| #define FN_NODE_BOOLEAN_MATH 1200 | #define FN_NODE_BOOLEAN_MATH 1200 | ||||
| ▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines | |||||