From 66f8835f9c03e7736297b5995a68e1455ed14e2a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 19 Jan 2021 14:28:44 +0100 Subject: Fix T84850: "Lock to Selection" causes unwanted jumps Adding new tracks, mask points, mask primitives, changing selection was causing an unwanted jumps in the view. This change makes it so those operations are preserving view offset. Differential Revision: https://developer.blender.org/D10146 --- source/blender/editors/space_clip/clip_intern.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/space_clip/clip_intern.h') diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h index 81df8cc8ecd..b9a69204281 100644 --- a/source/blender/editors/space_clip/clip_intern.h +++ b/source/blender/editors/space_clip/clip_intern.h @@ -171,8 +171,13 @@ void clip_delete_plane_track(struct bContext *C, struct MovieClip *clip, struct MovieTrackingPlaneTrack *plane_track); +void clip_view_offset_for_center_to_point( + SpaceClip *sc, const float x, const float y, float *r_offset_x, float *r_offset_y); void clip_view_center_to_point(SpaceClip *sc, float x, float y); +bool clip_view_calculate_view_selection( + const struct bContext *C, bool fit, float *r_offset_x, float *r_offset_y, float *r_zoom); + void clip_draw_sfra_efra(struct View2D *v2d, struct Scene *scene); /* tracking_ops.c */ -- cgit v1.2.3