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/editors/space_node/node_draw.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/editors/space_node/node_draw.c')
-rw-r--r--source/blender/editors/space_node/node_draw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index e031e056cd3..f4ffeb05608 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -868,7 +868,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
UI_ThemeColor(TH_TEXT);
#endif
- BLI_strncpy(showname, nodeLabel(node), sizeof(showname));
+ nodeLabel(node, showname, sizeof(showname));
//if (node->flag & NODE_MUTED)
// BLI_snprintf(showname, sizeof(showname), "[%s]", showname); /* XXX - don't print into self! */
@@ -1035,8 +1035,8 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
UI_ThemeColor(TH_TEXT);
if (node->miniwidth > 0.0f) {
- BLI_strncpy(showname, nodeLabel(node), sizeof(showname));
-
+ nodeLabel(node, showname, sizeof(showname));
+
//if (node->flag & NODE_MUTED)
// BLI_snprintf(showname, sizeof(showname), "[%s]", showname); /* XXX - don't print into self! */