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:
authorJuho Vepsalainen <bebraw@gmail.com>2007-12-27 13:17:33 +0300
committerJuho Vepsalainen <bebraw@gmail.com>2007-12-27 13:17:33 +0300
commitd06dc00af908584a02291cffb8704ac61caa12df (patch)
tree8f08c01b2a126bcf41d1e33be40f41f587582a87 /source/blender/makesdna/DNA_node_types.h
parent0dc38a5bd93bf3197083db424c7cd34d402bc9ad (diff)
Toggle links tool for Node Editor
This commit adds a new tool, Toggle Links, to the node editor. This tool allows the user to toggle the status (linked/not linked) between desired sockets. The tool can be used either by using the f key or the menus. This functionality is analogue to one found in object editing modes except for its additional toggle functionality. To use this tool, the user has to first select an input and an output socket. Selecting is done by clicking with right mouse button on a socket. After the tool has been invoked, the link between those two sockets is toggled. The result may vary based on existing linkage. There can be only one input and one output selected at maximum in a node tree. This means that if the user selects a socket while one of the same type is already selected, the old one will be deselected. The tool complements the current way of connecting nodes. One possible use for it is to use it to review output of nodes by using a viewer node. Just select wanted input socket of a viewer node, set it visible and use selection of an output socket in conjuction with f key to show the output in the viewer node. Select another output and hit f to see its output and so on.
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r--source/blender/makesdna/DNA_node_types.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 5f20939fc23..b5084c41884 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -92,7 +92,8 @@ typedef struct bNodeSocket {
#define SOCK_IN_USE 4
/* unavailable is for dynamic sockets */
#define SOCK_UNAVAIL 8
-
+ /* flag for selection status */
+#define SOCK_SEL 16
#
#
typedef struct bNodePreview {
@@ -167,6 +168,10 @@ typedef struct bNodeTree {
ListBase alltypes; /* type definitions */
struct bNodeType *owntype; /* for groups or dynamic trees, no read/write */
+ /* selected input/output socket */
+ bNodeSocket *selin;
+ bNodeSocket *selout;
+
/* callbacks */
void (*timecursor)(int nr);
void (*stats_draw)(char *str);