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:
authorGaia Clary <gaia.clary@machinimatrix.org>2012-09-03 21:54:04 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2012-09-03 21:54:04 +0400
commit192935eb0493e6b1685ad5e867b4d1c9a4ed112a (patch)
treebb4e916eedeb5f7c604029388352b6c821cb2163 /source/blender/collada/AnimationImporter.cpp
parenta2515f3ca060500e0407bf39ec261e884c254765 (diff)
fix:32348 Collada yfov to xfov conversion fo camera settings
Diffstat (limited to 'source/blender/collada/AnimationImporter.cpp')
-rw-r--r--source/blender/collada/AnimationImporter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index d241926c20c..b2748a55b6a 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -683,12 +683,11 @@ void AnimationImporter::Assign_lens_animations(const COLLADAFW::UniqueId& listid
for (unsigned int i = 0; i < fcu->totvert; i++) {
double input_fov = fcu->bezt[i].vec[1][1];
- double xfov = (fov_type == CAMERA_YFOV) ? aspect * input_fov : input_fov;
- // fov is in degrees, cam->lens is in millimiters
- double fov = fov_to_focallength(DEG2RADF(input_fov), cam->sensor_x);
+ // NOTE: Needs more testing (As we curretnly have no official test data for this)
+ double xfov = (fov_type == CAMERA_YFOV) ? (2.0f * atanf(aspect * tanf(DEG2RADF(input_fov) * 0.5f))) : DEG2RADF(input_fov);
- fcu->bezt[i].vec[1][1] = fov;
+ fcu->bezt[i].vec[1][1] = fov_to_focallength(xfov, cam->sensor_x);
}
BLI_addtail(AnimCurves, fcu);