From 8a68326f8151ea28b1fd559c92eba1847b3330b4 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Tue, 28 Sep 2010 08:01:20 +0000 Subject: COLLADA: Better import and export of cameras. --- source/blender/collada/DocumentExporter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/collada/DocumentExporter.cpp') 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); -- cgit v1.2.3