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:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-01-08 14:23:19 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-01-08 14:23:19 +0400
commit3dead22c7322cf72ee63a003ba50940abc12e7c9 (patch)
tree47e816c996531c73114afe574fc8b2b0191e0c2c /source/blender/nodes
parentd6e0d0fd897c33eb581f34150d86247ddba2bb7e (diff)
Improved auto-hiding of unused sockets for collapsed nodes.
Instead of generally hiding all unused sockets in collapsed mode, the sockets now have a new explicit flag SOCK_AUTO_HIDDEN, which is only toggled when the hide_toggle operator is called. This way the auto-hidden sockets stay as they are when nodes are duplicated etc. The new flag is necessary to distinguish between manually hidden sockets (via hide_sockets_toggle operator) and automatically hidden sockets and restore the node state when unhiding a node.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/intern/node_common.c4
-rw-r--r--source/blender/nodes/shader/node_shader_util.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index 5ad84da45d2..fdce1f92948 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -609,7 +609,7 @@ void node_group_expose_all_sockets(bNodeTree *ngroup)
for (node=ngroup->nodes.first; node; node=node->next) {
for (sock=node->inputs.first; sock; sock=sock->next) {
- if (!sock->link && !(sock->flag & SOCK_HIDDEN)) {
+ if (!sock->link && !nodeSocketIsHidden(sock)) {
gsock = node_group_add_socket(ngroup, sock->name, sock->type, SOCK_IN);
/* initialize the default value. */
@@ -619,7 +619,7 @@ void node_group_expose_all_sockets(bNodeTree *ngroup)
}
}
for (sock=node->outputs.first; sock; sock=sock->next) {
- if (nodeCountSocketLinks(ngroup, sock)==0 && !(sock->flag & SOCK_HIDDEN)) {
+ if (nodeCountSocketLinks(ngroup, sock)==0 && !nodeSocketIsHidden(sock)) {
gsock = node_group_add_socket(ngroup, sock->name, sock->type, SOCK_OUT);
/* initialize the default value. */
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index 8b8afc3d846..1bfb986fdde 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -184,7 +184,7 @@ void nodeShaderSynchronizeID(bNode *node, int copyto)
/* hrmf, case in loop isnt super fast, but we dont edit 100s of material at same time either! */
for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) {
- if(!(sock->flag & SOCK_HIDDEN)) {
+ if(!nodeSocketIsHidden(sock)) {
if(copyto) {
switch(a) {
case MAT_IN_COLOR: