diff options
author | Pablo Vazquez <venomgfx@gmail.com> | 2013-03-22 16:57:32 +0400 |
---|---|---|
committer | Pablo Vazquez <venomgfx@gmail.com> | 2013-03-22 16:57:32 +0400 |
commit | 7f86b8afeba44e4ef60d3a195662d94cac491c74 (patch) | |
tree | 2b62ce8acbcaa13af679bb798c961b9bafeae724 /source/blender/editors | |
parent | fbdec130052ad8d2db63b69581771fc96577360d (diff) |
Nodes editor,
Draw an extra outline on hidden nodes that have custom colors, otherwise you can't recognize them unless you unhide.
Example: http://pasteall.org/pic/show.php?id=42359
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 5723e4d34fb..a7dbe6b2a90 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -975,7 +975,19 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b glDisable(GL_LINE_SMOOTH); glDisable(GL_BLEND); } - + + /* custom color inline */ + if (node->flag & NODE_CUSTOM_COLOR) { + glEnable(GL_BLEND); + glEnable(GL_LINE_SMOOTH); + + glColor3fv(node->color); + uiDrawBox(GL_LINE_LOOP, rct->xmin + 1, rct->ymin + 1, rct->xmax -1, rct->ymax - 1, hiddenrad); + + glDisable(GL_LINE_SMOOTH); + glDisable(GL_BLEND); + } + /* title */ if (node->flag & SELECT) UI_ThemeColor(TH_SELECT); |