From 3dead22c7322cf72ee63a003ba50940abc12e7c9 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Sun, 8 Jan 2012 10:23:19 +0000 Subject: 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. --- source/blender/makesdna/DNA_node_types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index aa9b43584fd..e2d612169e7 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -129,6 +129,8 @@ typedef struct bNodeSocket { #define SOCK_COLLAPSED 64 /* hide socket value, if it gets auto default */ #define SOCK_HIDE_VALUE 128 + /* socket hidden automatically, to distinguish from manually hidden */ +#define SOCK_AUTO_HIDDEN 256 typedef struct bNodePreview { unsigned char *rect; -- cgit v1.2.3