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:
authorJacques Lucke <jacques@blender.org>2021-04-01 15:36:44 +0300
committerJacques Lucke <jacques@blender.org>2021-04-01 15:39:12 +0300
commitb00727950c28c31563426ea3c8c745b2c67e042d (patch)
tree996da96008edf2bd7f38d2fad5ca48707b0274f0 /source/blender/editors/space_node/node_draw.cc
parent1bdceb813ccb9690e5746731038e7f0ce92ed134 (diff)
Nodes: separate node name and display name in bNodeTreePath
Previously, `node_name` was rarely actually a name of a node. It is set correctly as node name in `ED_node_tree_push`. However, later on it was overwritten by the name of an id data block in `node_draw_space`. Now, the node_name stays the name of the "parent" node. Whereas display_name is the name that will be displayed in the breadcrumbs. With this change, the `node_name` can be used to reconstruct the actual path from the root node tree to the currently visible tree. Differential Revision: https://developer.blender.org/D10874
Diffstat (limited to 'source/blender/editors/space_node/node_draw.cc')
-rw-r--r--source/blender/editors/space_node/node_draw.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index f64ce771b25..07a5dbe1d7b 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -1959,8 +1959,8 @@ void node_draw_space(const bContext *C, ARegion *region)
ID *name_id = (path->nodetree && path->nodetree != snode->nodetree) ? &path->nodetree->id :
snode->id;
- if (name_id && UNLIKELY(!STREQ(path->node_name, name_id->name + 2))) {
- BLI_strncpy(path->node_name, name_id->name + 2, sizeof(path->node_name));
+ if (name_id && UNLIKELY(!STREQ(path->display_name, name_id->name + 2))) {
+ BLI_strncpy(path->display_name, name_id->name + 2, sizeof(path->display_name));
}
/* Current View2D center, will be set temporarily for parent node trees. */