diff options
author | Monique Dewanchand <m.dewanchand@atmind.nl> | 2013-01-23 01:35:33 +0400 |
---|---|---|
committer | Monique Dewanchand <m.dewanchand@atmind.nl> | 2013-01-23 01:35:33 +0400 |
commit | aa8fda324bfb8b224810441b4e98d625cbfda3ad (patch) | |
tree | ff5d2a2b48307a053e21ae23e38a40d7b510845e /source | |
parent | 8b8d4ba7effcf73d72e224d2934b6ad0f3a5ee74 (diff) |
Displaying labelname with reroute nodes.
It uses the default text color.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 981a1775b51..ffc780ebf69 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1121,8 +1121,10 @@ static void node_update_reroute(const bContext *UNUSED(C), bNodeTree *UNUSED(ntr static void node_draw_reroute(const bContext *C, ARegion *ar, SpaceNode *UNUSED(snode), bNodeTree *ntree, bNode *node) { bNodeSocket *sock; -#if 0 /* UNUSED */ + char showname[128]; /* 128 used below */ rctf *rct = &node->totr; + +#if 0 /* UNUSED */ float size = NODE_REROUTE_SIZE; #endif float socket_size = NODE_SOCKSIZE; @@ -1163,6 +1165,15 @@ static void node_draw_reroute(const bContext *C, ARegion *ar, SpaceNode *UNUSED( } #endif + if (node->label[0] != '\0') { + /* draw title (node label) */ + BLI_strncpy(showname, node->label, sizeof(showname)); + uiDefBut(node->block, LABEL, 0, showname, + (int)(rct->xmin-NODE_DYS), (int)(rct->ymax), + (short)512, (short)NODE_DY, + NULL, 0, 0, 0, 0, ""); + } + /* only draw input socket. as they all are placed on the same position. * highlight also if node itself is selected, since we don't display the node body separately! */ |