diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-11-12 22:17:58 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-11-12 22:17:58 +0400 |
commit | 8663b940eda703c45baf664c9aa379a9ecb684f9 (patch) | |
tree | f3f873d4bb7facefe1534799f43b94b464d0a1ab /source/blender/blenkernel/BKE_node.h | |
parent | ba7fd8cd5c173730c8c2250eac7ea48fafd519c7 (diff) |
Instead of requiring a const char* return from the (optional) node label callback function, let it write into a mutable string buffer. This will allow actual dynamic labels for nodes using the python
API.
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 05824ae6950..1fdceb872f9 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -175,7 +175,7 @@ typedef struct bNodeType { void (*draw_backdrop)(struct SpaceNode *snode, struct ImBuf *backdrop, struct bNode *node, int x, int y); /// Optional custom label function for the node header. - const char *(*labelfunc)(struct bNode *); + void (*labelfunc)(struct bNode *node, char *label, int maxlen); /// Optional custom resize handle polling. int (*resize_area_func)(struct bNode *node, int x, int y); /// Optional selection area polling. @@ -556,7 +556,7 @@ void BKE_node_preview_set_pixel(struct bNodePreview *preview, const f /* ************** NODE TYPE ACCESS *************** */ -const char *nodeLabel(struct bNode *node); +void nodeLabel(struct bNode *node, char *label, int maxlen); int nodeGroupPoll(struct bNodeTree *nodetree, struct bNodeTree *grouptree); @@ -571,7 +571,7 @@ void node_type_storage(struct bNodeType *ntype, const char *storagename, void (*freefunc)(struct bNode *node), void (*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, struct bNode *src_node)); -void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *)); +void node_type_label(struct bNodeType *ntype, void (*labelfunc)(struct bNode *, char *label, int maxlen)); void node_type_update(struct bNodeType *ntype, void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node), void (*verifyfunc)(struct bNodeTree *ntree, struct bNode *node, struct ID *id)); |