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/nodes/intern/node_common.c | |
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/nodes/intern/node_common.c')
-rw-r--r-- | source/blender/nodes/intern/node_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c index a8133460628..c5f98ea64bd 100644 --- a/source/blender/nodes/intern/node_common.c +++ b/source/blender/nodes/intern/node_common.c @@ -82,9 +82,9 @@ bNodeSocket *node_group_find_output_socket(bNode *groupnode, const char *identif } /* groups display their internal tree name as label */ -const char *node_group_label(bNode *node) +void node_group_label(bNode *node, char *label, int maxlen) { - return (node->id) ? node->id->name + 2 : IFACE_("Missing Datablock"); + BLI_strncpy(label, (node->id) ? node->id->name + 2 : IFACE_("Missing Datablock"), maxlen); } int node_group_poll_instance(bNode *node, bNodeTree *nodetree) |