Fix node editor to display node group names in the bottom left corner.

Currently it pointlessly repeats the material name there, separated by
slashes. That obviously should display the nested group path instead.
This commit is contained in:
Alexander Gavrilov
2016-08-30 12:32:31 +03:00
parent 47b87e1f3b
commit 3a0c0c1b54

View File

@@ -1327,8 +1327,10 @@ void drawnodespace(const bContext *C, ARegion *ar)
path = snode->treepath.last; path = snode->treepath.last;
/* update tree path name (drawn in the bottom left) */ /* update tree path name (drawn in the bottom left) */
if (snode->id && UNLIKELY(!STREQ(path->node_name, snode->id->name + 2))) { ID *name_id = (path->nodetree && path->nodetree != snode->nodetree) ? &path->nodetree->id : snode->id;
BLI_strncpy(path->node_name, snode->id->name + 2, sizeof(path->node_name));
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));
} }
/* current View2D center, will be set temporarily for parent node trees */ /* current View2D center, will be set temporarily for parent node trees */