diff options
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r-- | source/blender/editors/space_node/node_relationships.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index d81c764af81..1aaf0baae6d 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -438,6 +438,17 @@ static int node_link_viewer(const bContext *C, bNode *tonode) } } + if (tonode) { + /* Find a selected socket that overrides the socket to connect to */ + for (bNodeSocket *sock2 = tonode->outputs.first; sock2; sock2 = sock2->next) { + if (!nodeSocketIsHidden(sock2) && sock2->flag & SELECT) { + sock = sock2; + break; + } + } + } + + /* find a socket starting from the first socket */ if (!sock) { for (sock = tonode->outputs.first; sock; sock = sock->next) |