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
This commit is contained in:
2020-07-27 15:03:23 +03:00
parent b016e7f258
commit 9306037ed3
6 changed files with 87 additions and 11 deletions

View File

@@ -48,6 +48,11 @@ void node_verify_socket_templates(struct bNodeTree *ntree, struct bNode *node);
void node_socket_init_default_value(struct bNodeSocket *sock);
void node_socket_copy_default_value(struct bNodeSocket *to, const struct bNodeSocket *from);
void node_socket_skip_reroutes(struct ListBase *links,
struct bNode *node,
struct bNodeSocket *socket,
struct bNode **r_node,
struct bNodeSocket **r_socket);
void register_standard_node_socket_types(void);
#ifdef __cplusplus