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/composite
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/composite')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_moviedistortion.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
index b110cffd080..4d4781a4ffa 100644
--- a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
+++ b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
@@ -48,12 +48,12 @@ static bNodeSocketTemplate cmp_node_moviedistortion_out[] = {
{ -1, 0, "" }
};
-static const char *label(bNode *node)
+static void label(bNode *node, char *label, int maxlen)
{
if (node->custom1 == 0)
- return IFACE_("Undistortion");
+ BLI_strncpy(label, IFACE_("Undistortion"), maxlen);
else
- return IFACE_("Distortion");
+ BLI_strncpy(label, IFACE_("Distortion"), maxlen);
}
static void init(const bContext *C, PointerRNA *ptr)