diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-05-13 18:14:28 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-05-13 18:18:25 +0300 |
commit | a80ad0a54578d6e92695dced22538bdca3c8e1a7 (patch) | |
tree | 748b479579585a806ce0e7dfdaa9a51b7c062453 /source/blender/editors/space_clip/tracking_select.c | |
parent | 4680331749aa716fe01445c473308f3ff80ec8c9 (diff) |
Refactor: Use coordinate in API for track selection
Currently no functional changes. Prepares for a change which will
allow to more consistently redo the track selection operator.
Diffstat (limited to 'source/blender/editors/space_clip/tracking_select.c')
-rw-r--r-- | source/blender/editors/space_clip/tracking_select.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c index 1f6ec7de978..db985ae67e5 100644 --- a/source/blender/editors/space_clip/tracking_select.c +++ b/source/blender/editors/space_clip/tracking_select.c @@ -402,15 +402,17 @@ static int select_invoke(bContext *C, wmOperator *op, const wmEvent *event) SpaceClip *sc = CTX_wm_space_clip(C); ARegion *region = CTX_wm_region(C); - float co[2]; const bool extend = RNA_boolean_get(op->ptr, "extend"); + float co[2]; + ED_clip_mouse_pos(sc, region, event->mval, co); + /* Special code which allows to slide a marker which belongs to currently selected but not yet * active track. If such track is found activate it and return pass-though so that marker slide * operator can be used immediately after. * This logic makes it convenient to slide markers when left mouse selection is used. */ if (!extend) { - MovieTrackingTrack *track = tracking_find_slidable_track_in_proximity(C, event); + MovieTrackingTrack *track = tracking_find_slidable_track_in_proximity(C, co); if (track != NULL) { MovieClip *clip = ED_space_clip_get_clip(sc); @@ -423,7 +425,6 @@ static int select_invoke(bContext *C, wmOperator *op, const wmEvent *event) } } - ED_clip_mouse_pos(sc, region, event->mval, co); RNA_float_set_array(op->ptr, "location", co); return select_exec(C, op); |