Merging r39998 through r40043 from trunk into soc-2011-tomato
[blender-staging.git] / source / blender / collada / CameraExporter.cpp
index 542409072f15fa9e39409c2f804c42f90b28b335..520650bc82efc4903bdf684763f1b4c19f6122dc 100644 (file)
@@ -73,7 +73,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),"xfov");
+               persp.setXFov(focallength_to_hfov((cam->lens)*(180.0f/M_PI), 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");