diff options
author | Juho Vepsalainen <bebraw@gmail.com> | 2007-12-27 13:17:33 +0300 |
---|---|---|
committer | Juho Vepsalainen <bebraw@gmail.com> | 2007-12-27 13:17:33 +0300 |
commit | d06dc00af908584a02291cffb8704ac61caa12df (patch) | |
tree | 8f08c01b2a126bcf41d1e33be40f41f587582a87 /source/blender/src/header_node.c | |
parent | 0dc38a5bd93bf3197083db424c7cd34d402bc9ad (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/src/header_node.c')
-rw-r--r-- | source/blender/src/header_node.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/src/header_node.c b/source/blender/src/header_node.c index ebdd42690f5..7255dcd3286 100644 --- a/source/blender/src/header_node.c +++ b/source/blender/src/header_node.c @@ -513,6 +513,9 @@ static void do_node_nodemenu(void *arg, int event) case 10: /* execute */ addqueue(curarea->win, UI_BUT_EVENT, B_NODE_TREE_EXEC); break; + case 11: /* toggle link */ + node_toggle_link(snode); + break; } if(fromlib==-1) error_libdata(); @@ -537,6 +540,10 @@ static uiBlock *node_nodemenu(void *arg_unused) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete|X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Toggle Link|F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Group|Ctrl G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Ungroup|Alt G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); |