diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2010-09-28 12:01:20 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2010-09-28 12:01:20 +0400 |
commit | 8a68326f8151ea28b1fd559c92eba1847b3330b4 (patch) | |
tree | 04b2c16523bdf728c901007abe1786270b66c0b1 /source/blender/collada/DocumentExporter.cpp | |
parent | 690397efb2ab7b18de88a299cb3d08b8646caa25 (diff) |
COLLADA: Better import and export of cameras.
Diffstat (limited to 'source/blender/collada/DocumentExporter.cpp')
-rw-r--r-- | source/blender/collada/DocumentExporter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp index 9fdc07f391b..deddd8f8cba 100644 --- a/source/blender/collada/DocumentExporter.cpp +++ b/source/blender/collada/DocumentExporter.cpp @@ -1905,15 +1905,15 @@ public: } void operator()(Object *ob, Scene *sce) { - // XXX add other params later + // TODO: shiftx, shifty, YF_dofdist Camera *cam = (Camera*)ob->data; std::string cam_id(get_camera_id(ob)); std::string cam_name(id_name(cam)); if (cam->type == CAM_PERSP) { COLLADASW::PerspectiveOptic persp(mSW); - persp.setXFov(1.0); - persp.setAspectRatio(0.1); + persp.setXFov(lens_to_angle(cam->lens)*(180.0f/M_PI)); + persp.setAspectRatio(1.0); persp.setZFar(cam->clipend); persp.setZNear(cam->clipsta); COLLADASW::Camera ccam(mSW, &persp, cam_id, cam_name); @@ -1921,8 +1921,8 @@ public: } else { COLLADASW::OrthographicOptic ortho(mSW); - ortho.setXMag(1.0); - ortho.setAspectRatio(0.1); + ortho.setXMag(cam->ortho_scale); + ortho.setAspectRatio(1.0); ortho.setZFar(cam->clipend); ortho.setZNear(cam->clipsta); COLLADASW::Camera ccam(mSW, &ortho, cam_id, cam_name); |