Revision: 38200
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38200
Author:   phabtar
Date:     2011-07-07 18:40:46 +0000 (Thu, 07 Jul 2011)
Log Message:
-----------
Camera clipend animation export

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/collada/AnimationExporter.cpp
    branches/soc-2011-pepper/source/blender/collada/CameraExporter.cpp

Modified: branches/soc-2011-pepper/source/blender/collada/AnimationExporter.cpp
===================================================================
--- branches/soc-2011-pepper/source/blender/collada/AnimationExporter.cpp       
2011-07-07 17:59:15 UTC (rev 38199)
+++ branches/soc-2011-pepper/source/blender/collada/AnimationExporter.cpp       
2011-07-07 18:40:46 UTC (rev 38200)
@@ -91,7 +91,8 @@
                        transformName = extract_transform_name( fcu->rna_path );
                                
                                if ((!strcmp(transformName, "lens"))||
-                                       (!strcmp(transformName, 
"ortho_scale"))) 
+                                       (!strcmp(transformName, 
"ortho_scale"))||
+                                       (!strcmp(transformName, "clipend"))) 
                                        dae_animation(ob ,fcu, 
transformName,true );
                                fcu = fcu->next;
                        }
@@ -185,8 +186,9 @@
                        if (fcu->array_index < 4)
                        axis_name = axis_names[fcu->array_index];*/
                }
+               //maybe a list or a vector of float animations
                else if ( !strcmp(transformName, 
"spot_size")||!strcmp(transformName, "spot_blend")||
-                                 !strcmp(transformName, 
"lens")||!strcmp(transformName, "ortho_scale"))
+                                 !strcmp(transformName, 
"lens")||!strcmp(transformName, "ortho_scale")||!strcmp(transformName, 
"clipend"))
                {
                        axis_name = "";
                }
@@ -807,6 +809,8 @@
                                tm_type = 7;
             else if (!strcmp(name, "ortho_scale"))
                                tm_type = 8;
+                       else if (!strcmp(name, "clipend"))
+                               tm_type = 9;
                        else
                                tm_type = -1;
                }
@@ -838,6 +842,9 @@
                case 8:
                        tm_name = "xmag";
                        break;
+               case 9:
+                       tm_name = "zfar";
+                       break;
                
                default:
                        tm_name = "";

Modified: branches/soc-2011-pepper/source/blender/collada/CameraExporter.cpp
===================================================================
--- branches/soc-2011-pepper/source/blender/collada/CameraExporter.cpp  
2011-07-07 17:59:15 UTC (rev 38199)
+++ branches/soc-2011-pepper/source/blender/collada/CameraExporter.cpp  
2011-07-07 18:40:46 UTC (rev 38200)
@@ -74,8 +74,8 @@
        if (cam->type == CAM_PERSP) {
                COLLADASW::PerspectiveOptic persp(mSW);
                persp.setXFov(lens_to_angle(cam->lens)*(180.0f/M_PI),"xfov");
-               
persp.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,cam_name);
-               persp.setZFar(cam->clipend);
+               
persp.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,"aspect_ratio");
+               persp.setZFar(cam->clipend, false , "zfar");
                persp.setZNear(cam->clipsta);
                COLLADASW::Camera ccam(mSW, &persp, cam_id, cam_name);
                addCamera(ccam);
@@ -83,8 +83,8 @@
        else {
                COLLADASW::OrthographicOptic ortho(mSW);
                ortho.setXMag(cam->ortho_scale,"xmag");
-               ortho.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch));
-               ortho.setZFar(cam->clipend);
+               
ortho.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,"aspect_ratio");
+               ortho.setZFar(cam->clipend , false , "zfar");
                ortho.setZNear(cam->clipsta);
                COLLADASW::Camera ccam(mSW, &ortho, cam_id, cam_name);
                addCamera(ccam);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to