diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 10 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.cc | 9 |
2 files changed, 6 insertions, 13 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 0902e6867a2..777cc807423 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -258,7 +258,10 @@ typedef struct bNodeType { * Optional custom label function for the node header. * \note Used as a fallback when #bNode.label isn't set. */ - void (*labelfunc)(struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen); + void (*labelfunc)(const struct bNodeTree *ntree, + const struct bNode *node, + char *label, + int maxlen); /** Called when the node is updated in the editor. */ void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node); @@ -967,7 +970,7 @@ void BKE_node_preview_set_pixel( /** \name Node Type Access * \{ */ -void nodeLabel(struct bNodeTree *ntree, 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. */ @@ -1000,9 +1003,6 @@ void node_type_storage(struct bNodeType *ntype, void (*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node)); -void node_type_label( - struct bNodeType *ntype, - void (*labelfunc)(struct bNodeTree *ntree, struct bNode *, char *label, int maxlen)); void node_type_update(struct bNodeType *ntype, void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node)); void node_type_group_update(struct bNodeType *ntype, diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index 74c762439c7..a78917ab0a3 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -5180,7 +5180,7 @@ void nodeUpdateInternalLinks(bNodeTree *ntree, bNode *node) /* ************* node type access ********** */ -void nodeLabel(bNodeTree *ntree, bNode *node, char *label, int maxlen) +void nodeLabel(const bNodeTree *ntree, const bNode *node, char *label, int maxlen) { label[0] = '\0'; @@ -5400,13 +5400,6 @@ void node_type_storage(bNodeType *ntype, ntype->freefunc = freefunc; } -void node_type_label( - struct bNodeType *ntype, - void (*labelfunc)(struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen)) -{ - ntype->labelfunc = labelfunc; -} - void node_type_update(struct bNodeType *ntype, void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node)) { |