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:
authorHans Goudey <h.goudey@me.com>2022-09-13 00:43:54 +0300
committerHans Goudey <h.goudey@me.com>2022-09-13 00:43:54 +0300
commitea474dda620036ff7003cbb6f2826952a08ceb14 (patch)
tree485a1dfa73efb9b78f9799bcea7e6b4e4e6caca0
parent5bad311f4ce47194a181d902637299fe26fd17ba (diff)
Fix: Node edge pan and remove on cancel doesn't work
Caused by 4a71765f9a41 which used an operator that didn't have the properties it expected.
-rw-r--r--source/blender/editors/space_node/link_drag_search.cc4
-rw-r--r--source/blender/editors/space_node/node_ops.cc2
2 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/link_drag_search.cc b/source/blender/editors/space_node/link_drag_search.cc
index a4be0a65230..f1387da97b5 100644
--- a/source/blender/editors/space_node/link_drag_search.cc
+++ b/source/blender/editors/space_node/link_drag_search.cc
@@ -227,12 +227,10 @@ static void link_drag_search_exec_fn(bContext *C, void *arg1, void *arg2)
ED_node_tree_propagate_change(C, &bmain, snode.edittree);
/* Start translation operator with the new node. */
- wmOperatorType *ot = WM_operatortype_find("NODE_OT_translate_attach", true);
+ wmOperatorType *ot = WM_operatortype_find("NODE_OT_translate_attach_remove_on_cancel", true);
BLI_assert(ot);
PointerRNA ptr;
WM_operator_properties_create_ptr(&ptr, ot);
- RNA_boolean_set(&ptr, "view2d_edge_pan", true);
- RNA_boolean_set(&ptr, "remove_on_cancel", true);
WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, &ptr, nullptr);
WM_operator_properties_free(&ptr);
}
diff --git a/source/blender/editors/space_node/node_ops.cc b/source/blender/editors/space_node/node_ops.cc
index 3b3189983e2..a208370a6f9 100644
--- a/source/blender/editors/space_node/node_ops.cc
+++ b/source/blender/editors/space_node/node_ops.cc
@@ -144,7 +144,7 @@ void ED_operatormacros_node()
WM_operatortype_macro_define(ot, "NODE_OT_attach");
WM_operatortype_macro_define(ot, "NODE_OT_insert_offset");
- /* NODE_OT_translate_attach with remove_on_canel set to true */
+ /* NODE_OT_translate_attach with remove_on_cancel set to true. */
ot = WM_operatortype_append_macro("NODE_OT_translate_attach_remove_on_cancel",
"Move and Attach",
"Move nodes and attach to frame",