Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-11-20 15:44:55 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-11-20 15:44:55 +0400
commit713ee0f2e0d6bcbfce36efb7d9ce3f41045d1e25 (patch)
tree6efbb9457ffb888b2fea9e5149bcab80eb463905 /source/blender/editors/space_clip/space_clip.c
parent0332698e021d91d286d2d3a6320bab4e17667dde (diff)
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.
Diffstat (limited to 'source/blender/editors/space_clip/space_clip.c')
-rw-r--r--source/blender/editors/space_clip/space_clip.c11
1 files changed, 4 insertions, 7 deletions
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;