Page MenuHome

Moving nodes in the node editor stops after hotkey is lifted
Closed, ResolvedPublic


Blender Version
Broken: rB540eb2dc1e57
Worked: rB540eb2dc1e57^

Short description of error

The behavior in the node editors has changed. Whereas before you could move a node with G > Confirm, now the user has to hold down the G key to move. Releasing G causes the translate operator to stop.

More details

Any hotkey that results in nodes in the node editor (both shader editor and compositor) moving with the mouse now stops the movement as soon as the keyboard key is lifted, as opposed to continuing to move until mousebutton1 is pressed (which is/was the behaviour elsewhere in blender and in the node editor in the past iirc).

Examples are obviously G but also Shift+D (nodes created by duplication stop moving as soon as the D key is released)
strangely Shift+A does not have this problem, any new nodes that are added (but not made by duplicating) continue to move with the mouse as expected.

This makes the node editors almost unuseable for users accustomed to using hotkeys

Event Timeline

Philipp Oeser (lichtwerk) lowered the priority of this task from Needs Triage by Developer to Confirmed, High.Oct 4 2019, 12:42 PM

Caused by rB540eb2dc1e57, @Brecht Van Lommel (brecht): for mouse tweak this seemed fine, but not for keyboard
How about this instead?

3diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
4index 5874b6d1cc0..11933ef0811 100644
5--- a/source/blender/editors/space_node/node_ops.c
6+++ b/source/blender/editors/space_node/node_ops.c
7@@ -143,7 +143,6 @@ void ED_operatormacros_node(void)
8 "Move nodes and attach to frame",
10 mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
11- RNA_boolean_set(mot->ptr, "release_confirm", true);
12 WM_operatortype_macro_define(ot, "NODE_OT_attach");
13 WM_operatortype_macro_define(ot, "NODE_OT_insert_offset");
15@@ -153,7 +152,6 @@ void ED_operatormacros_node(void)
16 "Move nodes and attach to frame",
18 mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
19- RNA_boolean_set(mot->ptr, "release_confirm", true);
20 RNA_boolean_set(mot->ptr, "remove_on_cancel", true);
21 WM_operatortype_macro_define(ot, "NODE_OT_attach");
22 WM_operatortype_macro_define(ot, "NODE_OT_insert_offset");
23diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
24index 083b5b94c48..2f77b0453a4 100644
25--- a/source/blender/editors/transform/transform_generics.c
26+++ b/source/blender/editors/transform/transform_generics.c
27@@ -1707,7 +1707,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
28 }
29 }
30 else {
31- if (ISMOUSE(t->launch_event) && (U.flag & USER_RELEASECONFIRM)) {
32+ if (ISMOUSE(t->launch_event) && ((U.flag & USER_RELEASECONFIRM) || (t->spacetype == SPACE_NODE))) {
33 /* Global "release confirm" on mouse bindings */
34 t->flag |= T_RELEASE_CONFIRM;
35 }

@Philipp Oeser (lichtwerk) you can commit that. I tried to see if there is a better solution but couldn't find a good one, macros really should have some way to pass along operator properties.