Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmarSquircleArt <omar.squircleart@gmail.com>2019-08-10 18:37:39 +0300
committerOmarSquircleArt <omar.squircleart@gmail.com>2019-08-10 18:57:54 +0300
commit26911ba1e26b90d7fafcd2e877a52c55181896c1 (patch)
tree4e6841485745c1f681dafe41c2ac478006b4763d /source/blender/editors/space_node/drawnode.c
parentf51f4355b92457879a1b5fc064bfc4385fa7f278 (diff)
Nodes: Display vector values expanded, except when specified as compact.
Change the default drawing method of vector sockets to use a column layout. This allows more interactive use of nodes and avoids the one or two clicks needed to edit vector sockets in the old default component layout. Developers may still use the component layout by flaging the socket with the `SOCK_COMPACT` socket flag. For now, we choose to draw the SSS scale vector of the Principled and SSS nodes in a compact form because they don't require much interactivity. Reviewers: brecht, JacquesLucke Differential Revision: https://developer.blender.org/D5458
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index e63c8331f18..b63f0daaa0d 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -3333,7 +3333,13 @@ static void std_node_socket_draw(
uiItemR(layout, ptr, "default_value", 0, text, 0);
break;
case SOCK_VECTOR:
- uiTemplateComponentMenu(layout, ptr, "default_value", text);
+ if (sock->flag & SOCK_COMPACT) {
+ uiTemplateComponentMenu(layout, ptr, "default_value", text);
+ }
+ else {
+ uiLayout *column = uiLayoutColumn(layout, true);
+ uiItemR(column, ptr, "default_value", 0, text, 0);
+ }
break;
case SOCK_RGBA:
case SOCK_STRING: {