From 713ee0f2e0d6bcbfce36efb7d9ce3f41045d1e25 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 20 Nov 2012 11:44:55 +0000 Subject: Motion tracking: fixed View Selection operator in cases pixel aspect != 1 This could break old files a little bit -- clip view could be offset/zoomed in comparison with previous releases in pixel aspect != 1. --- source/blender/editors/space_clip/space_clip.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'source/blender/editors/space_clip') diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index ffe4762ad15..77e2a1bb3d3 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -1028,17 +1028,14 @@ static void clip_refresh(const bContext *C, ScrArea *sa) static void movieclip_main_area_set_view2d(const bContext *C, ARegion *ar) { SpaceClip *sc = CTX_wm_space_clip(C); - MovieClip *clip = ED_space_clip_get_clip(sc); - float x1, y1, w, h; + float x1, y1, w, h, aspx, aspy; int width, height, winx, winy; ED_space_clip_get_size(sc, &width, &height); + ED_space_clip_get_aspect(sc, &aspx, &aspy); - w = width; - h = height; - - if (clip) - h *= clip->aspy / clip->aspx / clip->tracking.camera.pixel_aspect; + w = width * aspx; + h = height * aspy; winx = BLI_rcti_size_x(&ar->winrct) + 1; winy = BLI_rcti_size_y(&ar->winrct) + 1; -- cgit v1.2.3