[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38165] branches/soc-2011-pepper/source/ blender/collada: camera ortho_scale (COLLADA xmag ) animation export
Sukhitha Jayathilake
pr.jayathilake at gmail.com
Wed Jul 6 21:00:40 CEST 2011
Revision: 38165
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38165
Author: phabtar
Date: 2011-07-06 19:00:40 +0000 (Wed, 06 Jul 2011)
Log Message:
-----------
camera ortho_scale (COLLADA xmag ) 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-06 18:50:59 UTC (rev 38164)
+++ branches/soc-2011-pepper/source/blender/collada/AnimationExporter.cpp 2011-07-06 19:00:40 UTC (rev 38165)
@@ -90,7 +90,8 @@
while (fcu) {
transformName = extract_transform_name( fcu->rna_path );
- if ((!strcmp(transformName, "lens")))
+ if ((!strcmp(transformName, "lens"))||
+ (!strcmp(transformName, "ortho_scale")))
dae_animation(ob ,fcu, transformName,true );
fcu = fcu->next;
}
@@ -184,9 +185,8 @@
if (fcu->array_index < 4)
axis_name = axis_names[fcu->array_index];*/
}
- else if ( !strcmp(transformName, "spot_size")||
- !strcmp(transformName, "spot_blend")||
- !strcmp(transformName, "lens"))
+ else if ( !strcmp(transformName, "spot_size")||!strcmp(transformName, "spot_blend")||
+ !strcmp(transformName, "lens")||!strcmp(transformName, "ortho_scale"))
{
axis_name = "";
}
@@ -805,6 +805,8 @@
tm_type = 6;
else if (!strcmp(name, "lens"))
tm_type = 7;
+ else if (!strcmp(name, "ortho_scale"))
+ tm_type = 8;
else
tm_type = -1;
}
@@ -833,6 +835,9 @@
case 7:
tm_name = "xfov";
break;
+ case 8:
+ tm_name = "xmag";
+ 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-06 18:50:59 UTC (rev 38164)
+++ branches/soc-2011-pepper/source/blender/collada/CameraExporter.cpp 2011-07-06 19:00:40 UTC (rev 38165)
@@ -73,7 +73,7 @@
if (cam->type == CAM_PERSP) {
COLLADASW::PerspectiveOptic persp(mSW);
- persp.setXFov(lens_to_angle(cam->lens)*(180.0f/M_PI),"XFov");
+ 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.setZNear(cam->clipsta);
@@ -82,7 +82,7 @@
}
else {
COLLADASW::OrthographicOptic ortho(mSW);
- ortho.setXMag(cam->ortho_scale,"XMag");
+ ortho.setXMag(cam->ortho_scale,"xmag");
ortho.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch));
ortho.setZFar(cam->clipend);
ortho.setZNear(cam->clipsta);
More information about the Bf-blender-cvs
mailing list