Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-02-08 15:54:32 +0300
committerLukas Toenne <lukas.toenne@googlemail.com>2011-02-08 15:54:32 +0300
commit24db3d17aafd1b2027cd62afd39b2d648e8ec7d5 (patch)
tree0c27787854b73b384f0d3c46a1b8d9927a341b78 /source/blender/blenkernel/BKE_node.h
parentcd95dd42d7d8ee6eecde8e08cf406f6fa55f66c3 (diff)
Per-type node labels and customizable names. The label displayed in the node header is now by default the node type string. A custom label callback can be implemented to display more detailed information. This is currently used by group nodes, which display their internal tree name, and math, vector math, mix and filter nodes, which use their internal operation sub-type. Also the node tree selection/naming box for groups is now displayed only on open groups, to make it clearer that this is the internal type of the group and get a cleaner main tree.
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r--source/blender/blenkernel/BKE_node.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 32bf3d6e716..8428716ef1a 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -87,6 +87,7 @@ typedef struct bNodeType {
/* this line is set on startup of blender */
void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
+ const char *(*labelfunc)(struct bNode *);
void (*initfunc)(struct bNode *);
void (*freestoragefunc)(struct bNode *);
@@ -218,6 +219,7 @@ void node_type_storage(struct bNodeType *ntype,
void (*copystoragefunc)(struct bNode *, struct bNode *));
void node_type_exec(struct bNodeType *ntype, void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **));
void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out));
+void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *));
#define NODE_GROUP 2
#define NODE_GROUP_MENU 1000