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>2013-11-12 22:17:58 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-11-12 22:17:58 +0400
commit8663b940eda703c45baf664c9aa379a9ecb684f9 (patch)
treef3f873d4bb7facefe1534799f43b94b464d0a1ab /source/blender/nodes/intern/node_common.c
parentba7fd8cd5c173730c8c2250eac7ea48fafd519c7 (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.c4
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)