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:
authorNathan Letwory <nathan@letworyinteractive.com>2010-09-28 12:01:20 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2010-09-28 12:01:20 +0400
commit8a68326f8151ea28b1fd559c92eba1847b3330b4 (patch)
tree04b2c16523bdf728c901007abe1786270b66c0b1 /source/blender/collada/DocumentExporter.cpp
parent690397efb2ab7b18de88a299cb3d08b8646caa25 (diff)
COLLADA: Better import and export of cameras.
Diffstat (limited to 'source/blender/collada/DocumentExporter.cpp')
-rw-r--r--source/blender/collada/DocumentExporter.cpp10
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);