[Bf-blender-cvs] [59b7f3a1646] master: Fix T64660: no access to node connectors when a node is inside a layout frame.

Bastien Montagne noreply at git.blender.org
Thu May 16 11:13:18 CEST 2019


Commit: 59b7f3a16463f2286a8349028f15e7e7a3be06dc
Author: Bastien Montagne
Date:   Wed May 15 22:51:12 2019 +0200
Branches: master
https://developer.blender.org/rB59b7f3a16463f2286a8349028f15e7e7a3be06dc

Fix T64660: no access to node connectors when a node is inside a layout frame.

Note that the same issue actually showed without a frame node, when
trying to click-drag on a socket on its 'inside node' part, you would get
same behavior.

Only solution I can see here is to prevent Node selection to go on when
user clicks on one of its sockets, there is no way afaik to make
drag-from-socket to start if we keep select-node operator running
modal, since both operators (NODE_OT_select and NODE_OT_link) use the
same shortcut, if select (which is checked first, being a Tool) returns
modal, then event is considered handled it seems, even though
Passthrough is also returned...

===================================================================

M	source/blender/editors/space_node/node_select.c

===================================================================

diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index aab328249fe..a8331c26ce6 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -495,7 +495,17 @@ static int node_mouse_select(bContext *C,
     }
   }
 
-  if (!sock) {
+  /* In case we do two-steps selection, we do not want to select the node if some valid socket
+   * is below the mouse, as that would prevent draging from sockets (NODE_OT_link)
+   * to be properly triggered. See T64660. */
+  if (wait_to_deselect_others) {
+    if (node_find_indicated_socket(snode, &node, &sock, cursor, SOCK_IN) ||
+        node_find_indicated_socket(snode, &node, &sock, cursor, SOCK_OUT)) {
+      ret_value = OPERATOR_CANCELLED;
+    }
+  }
+
+  if (sock == NULL) {
     /* find the closest visible node */
     node = node_under_mouse_select(snode->edittree, (int)cursor[0], (int)cursor[1]);



More information about the Bf-blender-cvs mailing list