diff options
author | julianeisel <julian_eisel@web.de> | 2015-01-25 03:59:49 +0300 |
---|---|---|
committer | julianeisel <julian_eisel@web.de> | 2015-01-25 03:59:49 +0300 |
commit | 492b9ab5e3d8b4e1c425bfae5494c998853107ea (patch) | |
tree | eece6b66bfd7670375c4fd464d8f93eb6fe5627c /source | |
parent | c2af749ac3d545edeaba5b2f6bad33ac803bb36c (diff) |
Fix T43335: Node Editor: name doesn't update
Update Node Editor info (drawn on the bottom left) on redraw if needed
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 16ad63bcafa..0de231ba7cc 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -1302,8 +1302,15 @@ void drawnodespace(const bContext *C, ARegion *ar) bNodeLinkDrag *nldrag; LinkData *linkdata; + BLI_assert(snode->id != NULL); + path = snode->treepath.last; + /* update tree path name (drawn in the bottom left) */ + if (UNLIKELY(!STREQ(path->node_name, snode->id->name + 2))) { + BLI_strncpy(path->node_name, snode->id->name + 2, sizeof(path->node_name)); + } + /* current View2D center, will be set temporarily for parent node trees */ UI_view2d_center_get(v2d, ¢er[0], ¢er[1]); diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 4a73ff39a6e..d32fb58f6db 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -934,7 +934,7 @@ typedef struct bNodeTreePath { bNodeInstanceKey parent_key; /* base key for nodes in this tree instance */ int pad; float view_center[2]; /* v2d center point, so node trees can have different offsets in editors */ - /* XXX this is not automatically updated when node names are changed! */ + char node_name[64]; /* MAX_NAME */ } bNodeTreePath; |