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:
authorJeroen Bakker <j.bakker@atmind.nl>2019-03-22 19:03:02 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-03-22 19:03:28 +0300
commita96ccf20b6c30a44873cca817b8fa23de5e44a05 (patch)
treeccf4fcb72f927b54e4121c1b74c52b57f8035df1 /source/blender/editors/space_node/node_relationships.c
parent530e7cc799e3f70e346bbcaf428575c35232775d (diff)
NodeEditor: Connect Viewer To Socket Selection
Request from the Spring team. When compositing the CTRL-Shift Click on a node cycles the viewnode with an output socket. When you have many render layers you spend time cycling to the desired socket. This patch allows the user to CTRL-Shift Click on a socket to connect directly to that socket. Reviewed By: brecht Maniphest Tasks: T62785 Differential Revision: https://developer.blender.org/D4564
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r--source/blender/editors/space_node/node_relationships.c11
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)