[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39218] branches/soc-2011-pepper/source/ blender/collada: temporary fix for quat rotations

Sukhitha Jayathilake pr.jayathilake at gmail.com
Tue Aug 9 18:28:08 CEST 2011


Revision: 39218
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39218
Author:   phabtar
Date:     2011-08-09 16:28:08 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
temporary fix for quat rotations

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

Modified: branches/soc-2011-pepper/source/blender/collada/AnimationExporter.cpp
===================================================================
--- branches/soc-2011-pepper/source/blender/collada/AnimationExporter.cpp	2011-08-09 15:53:20 UTC (rev 39217)
+++ branches/soc-2011-pepper/source/blender/collada/AnimationExporter.cpp	2011-08-09 16:28:08 UTC (rev 39218)
@@ -208,10 +208,12 @@
 		
 		if ( !strcmp(transformName, "rotation_quaternion") )
 		{
+			fprintf(stderr, "quaternion rotations are not supported. rotation curves will not be exported\n");
 			quatRotation = true;
 			/*const char *axis_names[] = {"", "X", "Y", "Z"};
 			if (fcu->array_index < 4)
 			axis_name = axis_names[fcu->array_index];*/
+			return;
 		}
 		//maybe a list or a vector of float animations
 		else if ( !strcmp(transformName, "color")||!strcmp(transformName, "specular_color")||!strcmp(transformName, "diffuse_color")||

Modified: branches/soc-2011-pepper/source/blender/collada/AnimationImporter.cpp
===================================================================
--- branches/soc-2011-pepper/source/blender/collada/AnimationImporter.cpp	2011-08-09 15:53:20 UTC (rev 39217)
+++ branches/soc-2011-pepper/source/blender/collada/AnimationImporter.cpp	2011-08-09 16:28:08 UTC (rev 39218)
@@ -90,11 +90,12 @@
 {
 	COLLADAFW::FloatOrDoubleArray& input = curve->getInputValues();
 	COLLADAFW::FloatOrDoubleArray& output = curve->getOutputValues();
-   
+    
 	if( curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_BEZIER ) {
 	COLLADAFW::FloatOrDoubleArray& intan = curve->getInTangentValues();
     COLLADAFW::FloatOrDoubleArray& outtan = curve->getOutTangentValues();
 	}
+
 	float fps = (float)FPS;
 	size_t dim = curve->getOutDimension();
 	unsigned int i;
@@ -661,6 +662,14 @@
 			}
 			
 		case COLLADAFW::Transformation::MATRIX:
+			/*{
+				COLLADAFW::Matrix* mat = (COLLADAFW::Matrix*)transform;
+				COLLADABU::Math::Matrix4 mat4 = mat->getMatrix();
+				switch (binding->animationClass) {
+					case COLLADAFW::AnimationList::TRANSFORM:
+
+				}
+			}*/
 		case COLLADAFW::Transformation::SKEW:
 		case COLLADAFW::Transformation::LOOKAT:
 			fprintf(stderr, "Animation of MATRIX, SKEW and LOOKAT transformations is not supported yet.\n");




More information about the Bf-blender-cvs mailing list