diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2020-07-27 15:03:23 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2020-08-04 11:29:16 +0300 |
commit | 9306037ed3d14a7afce607738f83c8b9968d478d (patch) | |
tree | 6a0855906983fa33367060ef540ad611c1a83382 /source/blender/editors/space_node/drawnode.c | |
parent | b016e7f258a5be68af56574f185dd4acd08d9af5 (diff) |
Node Groups: expose the SOCK_HIDE_VALUE flag for node group inputs.
This flag specifies that even when the socket is not connected,
the node should not display the input field for the constant input
value. This is useful for inputs like Normal, which have special
handling for the missing input case and don't use a constant value.
Currently there is no way to change this flag from Python, and
through UI it can only be done by re-creating the socket.
This patch exposes the flag through RNA and UI, makes sure it
is properly updated when changed, and adds special handling to
ensure that it is correctly set when creating a node group from
a node set that includes reroute nodes.
Differential Revision: https://developer.blender.org/D8395
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 695214bcc2f..01883f1c086 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3576,6 +3576,8 @@ static void std_node_socket_interface_draw(bContext *UNUSED(C), uiLayout *layout break; } } + + uiItemR(layout, ptr, "hide_value", DEFAULT_FLAGS, NULL, 0); } void ED_init_standard_node_socket_type(bNodeSocketType *stype) |