From 048c7da4e97d780eb7298f99ed0085a489d284b8 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 22 Apr 2024 15:46:18 +0200 Subject: [PATCH] Fix: Difficult to LMB-click-drag motion tracking tracks When using RMB selection and RMB-click-drag from a track border it did not initiate translation of the track. This i because the selection operator does not return PASSTHROUGH for such selection. The code which was responsible for this has been ported from the tools branch to minimize the code difference, but it is not possible to detect condition under which the new operator behavior is needed without modifying the keymap. Simple solution: remove the code which was doing the wrong assumption in the main branch. Ref #119773 Pull Request: https://projects.blender.org/blender/blender/pulls/120940 --- .../editors/space_clip/tracking_select.cc | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/source/blender/editors/space_clip/tracking_select.cc b/source/blender/editors/space_clip/tracking_select.cc index 59fb3a57e52..2a2a664ed0f 100644 --- a/source/blender/editors/space_clip/tracking_select.cc +++ b/source/blender/editors/space_clip/tracking_select.cc @@ -577,8 +577,7 @@ static int select_exec(bContext *C, wmOperator *op) * operator can be used immediately after. * This logic makes it convenient to slide markers when left mouse selection is used. Without it * selection will be lost which causes inconvenience for the VFX artist. */ - const bool activate_selected = !extend; - if (activate_selected && ed_tracking_pick_can_slide(sc, &pick)) { + if (!extend && ed_tracking_pick_can_slide(sc, &pick)) { if (pick.point_track_pick.track != nullptr) { tracking_object->active_track = pick.point_track_pick.track; tracking_object->active_plane_track = nullptr; @@ -659,23 +658,6 @@ static int select_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_GEOM | ND_SELECT, nullptr); DEG_id_tag_update(&clip->id, ID_RECALC_SELECT); - /* This is a bit implicit, but when the selection operator is used from a LMB Add Marker and - * tweak tool we do not want the pass-through here and only want selection to happen. This way - * the selection operator will not fall-through to Add Marker operator. */ - if (activate_selected) { - if (ed_tracking_pick_can_slide(sc, &pick)) { - return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH; - } - - if (ed_tracking_pick_empty(&pick)) { - /* When nothing was selected pass-though and allow Add Marker part of the keymap to add new - * marker at the position. */ - return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH; - } - - return OPERATOR_FINISHED; - } - /* Pass-through + finished to allow tweak to transform. */ return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH; }