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-06-18 22:22:49 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-18 22:22:49 +0400
commitc4e386c772c42abc36886f74f2e54893df91b924 (patch)
tree126dee64a2edb5174b03b87abe75ebdff7ef2cfa /source/blender/blenkernel/intern/movieclip.c
parent58befeba602cde272505f283b0990b0286fdcad0 (diff)
DO not reset clip's focal length when changing path to footage
Diffstat (limited to 'source/blender/blenkernel/intern/movieclip.c')
-rw-r--r--source/blender/blenkernel/intern/movieclip.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 90b56e20669..04edc58157b 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -463,7 +463,6 @@ static void movieclip_load_get_szie(MovieClip *clip)
clip->tracking.camera.principal[0] = ((float)width) / 2.0f;
clip->tracking.camera.principal[1] = ((float)height) / 2.0f;
- clip->tracking.camera.focal = 24.0f * width / clip->tracking.camera.sensor_width;
}
}
@@ -518,6 +517,11 @@ MovieClip *BKE_movieclip_file_add(const char *name)
clip->source = MCLIP_SRC_SEQUENCE;
movieclip_load_get_szie(clip);
+ if (clip->lastsize[0]) {
+ int width = clip->lastsize[0];
+
+ clip->tracking.camera.focal = 24.0f * width / clip->tracking.camera.sensor_width;
+ }
movieclip_calc_length(clip);