diff options
author | Hans Goudey <h.goudey@me.com> | 2020-12-01 18:28:29 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-12-02 18:34:06 +0300 |
commit | 9281a1f4ebcbbc9ebeb1f11a9f68e45fb2dff5f1 (patch) | |
tree | 820cf00bc5a1917f90be18b22ce75dcc6f3ff72d /source/blender/editors | |
parent | 8522b1b6fbfd2590dab4ed4de3153d45a81f0371 (diff) |
UI: Add new node colors for geometry nodes
During the development of the new nodes in the `geometry-nodes` branch
the color of the new nodes wasn't considered, so all of the nodes ended
up red, the color for "input" nodes. This patch introduces two new
colors, one for "Geometry" and one for "Attributes". There are only two
attribute nodes currently, but the next sprint will add two more,
attribute mix, and sample from texture. The attribute nodes are
conceptually different enough from the nodes that modify the geometry
that they deserve their own color.
Differential Revision: https://developer.blender.org/D9682
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index f597bb307db..c09bf41e152 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -190,6 +190,8 @@ typedef enum ThemeColorID { TH_NODE_FRAME, TH_NODE_MATTE, TH_NODE_DISTORT, + TH_NODE_GEOMETRY, + TH_NODE_ATTRIBUTE, TH_CONSOLE_OUTPUT, TH_CONSOLE_INPUT, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index e55f84916b3..80e54f4f92f 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -619,6 +619,12 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_NODE_LAYOUT: cp = ts->nodeclass_layout; break; + case TH_NODE_GEOMETRY: + cp = ts->nodeclass_geometry; + break; + case TH_NODE_ATTRIBUTE: + cp = ts->nodeclass_attribute; + break; case TH_NODE_SHADER: cp = ts->nodeclass_shader; break; diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index fb83414e435..fc7fa3a6caa 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -679,6 +679,10 @@ int node_get_colorid(bNode *node) return TH_NODE_PATTERN; case NODE_CLASS_LAYOUT: return TH_NODE_LAYOUT; + case NODE_CLASS_GEOMETRY: + return TH_NODE_GEOMETRY; + case NODE_CLASS_ATTRIBUTE: + return TH_NODE_ATTRIBUTE; default: return TH_NODE; } |