From 324b22f701e1b3bc33ed48d30e13b0ca419baa81 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Tue, 15 May 2012 12:40:43 +0000 Subject: 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. --- source/blender/editors/space_node/node_intern.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_node/node_intern.h') 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; -- cgit v1.2.3