diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-10-25 01:57:16 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-10-25 01:57:16 +0400 |
commit | 5aa6327e2f3b0af57075f2aa6f6ad73083eec074 (patch) | |
tree | fcb41aaf8af1ce0cc907a6320b0e9e8650fc1897 /source/blender/editors/space_node | |
parent | b4d9037dfbd85bd26e0bd0ab82798956ca1d9a3f (diff) |
Cycles UI: keep node input sockets collapsed by default in the properties editor,
when doing the linking in the node editor, to keep the properties editor more
clean in this case.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_templates.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index 42480c0c2d9..d4df449a41b 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -122,6 +122,7 @@ static void node_socket_disconnect(Main *bmain, bNodeTree *ntree, bNode *node_to return; nodeRemLink(ntree, sock_to->link); + sock_to->flag |= SOCK_COLLAPSED; nodeUpdate(ntree, node_to); ntreeUpdateTree(ntree); @@ -136,6 +137,7 @@ static void node_socket_remove(Main *bmain, bNodeTree *ntree, bNode *node_to, bN return; node_remove_linked(ntree, sock_to->link->fromnode); + sock_to->flag |= SOCK_COLLAPSED; nodeUpdate(ntree, node_to); ntreeUpdateTree(ntree); @@ -185,6 +187,7 @@ static void node_socket_add_replace(Main *bmain, bNodeTree *ntree, bNode *node_t /* add link */ sock_from_tmp = BLI_findlink(&node_from->outputs, sock_num); nodeAddLink(ntree, node_from, sock_from_tmp, node_to, sock_to); + sock_to->flag &= ~SOCK_COLLAPSED; /* copy input sockets from previous node */ if (node_prev && node_from != node_prev) { @@ -613,7 +616,7 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree, /* input linked to a node */ uiTemplateNodeLink(split, ntree, node, input); - if (!(input->flag & SOCK_COLLAPSED)) { + if (depth == 0 || !(input->flag & SOCK_COLLAPSED)) { if (depth == 0) uiItemS(layout); |