diff options
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/CameraExporter.cpp | 2 | ||||
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/collada/CameraExporter.cpp b/source/blender/collada/CameraExporter.cpp index 6fa2c8763e0..fcb98cc7c32 100644 --- a/source/blender/collada/CameraExporter.cpp +++ b/source/blender/collada/CameraExporter.cpp @@ -71,7 +71,7 @@ void CamerasExporter::operator()(Object *ob, Scene *sce) if (cam->type == CAM_PERSP) { COLLADASW::PerspectiveOptic persp(mSW); - persp.setXFov(RAD2DEGF(lens_to_angle(cam->lens)), "xfov"); + persp.setXFov(RAD2DEGF(focallength_to_fov(cam->lens, cam->sensor_x)), "xfov"); persp.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,"aspect_ratio"); persp.setZFar(cam->clipend, false , "zfar"); persp.setZNear(cam->clipsta,false , "znear"); diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 8d133979fa4..8cdb1065699 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -814,7 +814,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera ) double aspect = camera->getAspectRatio().getValue(); double xfov = aspect*yfov; // xfov is in degrees, cam->lens is in millimiters - cam->lens = angle_to_lens(DEG2RADF(xfov)); + cam->lens = fov_to_focallength(DEG2RADF(xfov), cam->sensor_x); } break; } @@ -835,7 +835,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera ) { double x = camera->getXFov().getValue(); // x is in degrees, cam->lens is in millimiters - cam->lens = angle_to_lens(DEG2RADF(x)); + cam->lens = fov_to_focallength(DEG2RADF(x), cam->sensor_x); } break; } @@ -852,7 +852,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera ) { double yfov = camera->getYFov().getValue(); // yfov is in degrees, cam->lens is in millimiters - cam->lens = angle_to_lens(DEG2RADF(yfov)); + cam->lens = fov_to_focallength(DEG2RADF(yfov), cam->sensor_x); } break; } |