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/blenkernel/BKE_node.h | |
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/blenkernel/BKE_node.h')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 2ffa1d205da..b9df1e45bae 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -143,6 +143,7 @@ void nodeVerifyType(struct bNodeTree *ntree, struct bNode *node); void nodeAddToPreview(struct bNode *, float *, int, int); +void nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node); struct bNode *nodeAddNodeType(struct bNodeTree *ntree, int type, struct bNodeTree *ngroup); void nodeFreeNode(struct bNodeTree *ntree, struct bNode *node); struct bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node); @@ -150,6 +151,8 @@ struct bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node); struct bNodeLink *nodeAddLink(struct bNodeTree *ntree, struct bNode *fromnode, struct bNodeSocket *fromsock, struct bNode *tonode, struct bNodeSocket *tosock); void nodeRemLink(struct bNodeTree *ntree, struct bNodeLink *link); +int nodeFindNode(struct bNodeTree *ntree, struct bNodeSocket *sock, struct bNode **nodep, int *sockindex); + struct bNodeLink *nodeFindLink(struct bNodeTree *ntree, struct bNodeSocket *from, struct bNodeSocket *to); int nodeCountSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock); |