[Bf-blender-cvs] [3a0c0c1] master: Fix node editor to display node group names in the bottom left corner.

Alexander Gavrilov noreply at git.blender.org
Tue Aug 30 11:35:34 CEST 2016


Commit: 3a0c0c1b5425cd5b050cb742357da57266c70463
Author: Alexander Gavrilov
Date:   Tue Aug 30 12:32:31 2016 +0300
Branches: master
https://developer.blender.org/rB3a0c0c1b5425cd5b050cb742357da57266c70463

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.

===================================================================

M	source/blender/editors/space_node/node_draw.c

===================================================================

diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index d9c51e4..ab40c55 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -1327,8 +1327,10 @@ void drawnodespace(const bContext *C, ARegion *ar)
 		path = snode->treepath.last;
 		
 		/* update tree path name (drawn in the bottom left) */
-		if (snode->id && UNLIKELY(!STREQ(path->node_name, snode->id->name + 2))) {
-			BLI_strncpy(path->node_name, snode->id->name + 2, sizeof(path->node_name));
+		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));
 		}
 		
 		/* current View2D center, will be set temporarily for parent node trees */




More information about the Bf-blender-cvs mailing list