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-05-15 16:40:43 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-05-15 16:40:43 +0400
commit324b22f701e1b3bc33ed48d30e13b0ca419baa81 (patch)
tree706c3220689d87bf4e5119c816c6d940f8edfa6a /source/blender/editors/space_node/node_intern.h
parent8242f624a1d10649946f9db6994dc8b07a1c8218 (diff)
A generalization of the modal node linking operator (for dragging from socket to socket).
This operator still had some built-in assumptions about the connectivity of input/output sockets (1-to-n in all current node systems). For future node systems (e.g. flow-based particles) and for general customizable nodes the operator is now fully symmetric and supports all kinds of connectivity limits (1:1, 1:n, m:1, m:n). The operator data can also store a list of node links as opposed to a single link now, so that multiple links can be redirected at once. Holding the CTRL key when clicking a socket, all links from/to that socket are detached and can be moved to a different socket. This is useful for quickly appending a node without moving every individual link.
Diffstat (limited to 'source/blender/editors/space_node/node_intern.h')
-rw-r--r--source/blender/editors/space_node/node_intern.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 17078443987..802c471c7aa 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -52,9 +52,11 @@ typedef struct bNodeLinkDrag
{
struct bNodeLinkDrag *next, *prev;
- struct bNode *node;
- struct bNodeSocket *sock;
- struct bNodeLink *link;
+ /* List of links dragged by the operator.
+ * Note: This is a list of LinkData structs on top of the actual bNodeLinks.
+ * This way the links can be added to the node tree while being stored in this list.
+ */
+ ListBase links;
int in_out;
} bNodeLinkDrag;