diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2010-10-18 04:46:41 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2010-10-18 04:46:41 +0400 |
commit | 03085d2caea837f17b6c330c8306ecff67888ac2 (patch) | |
tree | e1b198538329e49f9c947db392360b19451ab43c /source/blender/collada/CameraExporter.cpp | |
parent | 05a105cac1b7733996a99e0fb074b3575620ccb5 (diff) |
Fix [#24200] COLLADA Exporter: Aspect ratio is not exported
Reported by Wenzel Jakob, patch [#24235] by Phil Gosch
Diffstat (limited to 'source/blender/collada/CameraExporter.cpp')
-rw-r--r-- | source/blender/collada/CameraExporter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/collada/CameraExporter.cpp b/source/blender/collada/CameraExporter.cpp index c3a6cda8b3c..d5e2a7e116c 100644 --- a/source/blender/collada/CameraExporter.cpp +++ b/source/blender/collada/CameraExporter.cpp @@ -68,7 +68,7 @@ void CamerasExporter::operator()(Object *ob, Scene *sce) if (cam->type == CAM_PERSP) { COLLADASW::PerspectiveOptic persp(mSW); persp.setXFov(lens_to_angle(cam->lens)*(180.0f/M_PI)); - persp.setAspectRatio(1.0); + persp.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch)); persp.setZFar(cam->clipend); persp.setZNear(cam->clipsta); COLLADASW::Camera ccam(mSW, &persp, cam_id, cam_name); @@ -77,7 +77,7 @@ void CamerasExporter::operator()(Object *ob, Scene *sce) else { COLLADASW::OrthographicOptic ortho(mSW); ortho.setXMag(cam->ortho_scale); - ortho.setAspectRatio(1.0); + ortho.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch)); ortho.setZFar(cam->clipend); ortho.setZNear(cam->clipsta); COLLADASW::Camera ccam(mSW, &ortho, cam_id, cam_name); |