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
This commit is contained in:
committed by
Sergey Sharybin
parent
563ad616f0
commit
048c7da4e9
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user