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-02-17 12:23:42 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-02-17 12:23:42 +0400
commitfdeca277fdfab889279c0a4a3b7b1935ff0121fa (patch)
treea8f32788aedbf92d10cc3200ae1961f5cf9178e5 /source/blender/editors
parent0cc2966516605a4c6bde7b83f072bb4be7e4a9e4 (diff)
Camera tracking: run aspect correction before stabilizing shot
This commit fixes image stopped being an orthogonal rectangle because of horizontal scaling caused by pixel aspect ratio happening after rotating image which used to make orthogonal angles from footage not actually orthogonal. -- svn merge -r44150:44151 ^/branches/soc-2011-tomato
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_clip/clip_draw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 49fa7837de6..6dda09a1451 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -1269,13 +1269,14 @@ void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene)
if(ibuf) {
float loc[2];
+ float aspect= clip->tracking.camera.pixel_aspect;
if(width != ibuf->x)
mul_v2_v2fl(loc, sc->loc, (float)width / ibuf->x);
else
copy_v2_v2(loc, sc->loc);
- BKE_tracking_stabdata_to_mat4(width, height, loc, sc->scale, sc->angle, sc->stabmat);
+ BKE_tracking_stabdata_to_mat4(width, height, aspect, loc, sc->scale, sc->angle, sc->stabmat);
unit_m4(smat);
smat[0][0]= 1.0f/width;