[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38056] branches/soc-2011-pepper/source/ blender/collada: find_frames() calls removed.

Sukhitha Jayathilake pr.jayathilake at gmail.com
Sun Jul 3 13:28:40 CEST 2011


Revision: 38056
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38056
Author:   phabtar
Date:     2011-07-03 11:28:40 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
find_frames() calls removed.

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

Modified: branches/soc-2011-pepper/source/blender/collada/AnimationImporter.cpp
===================================================================
--- branches/soc-2011-pepper/source/blender/collada/AnimationImporter.cpp	2011-07-03 11:07:34 UTC (rev 38055)
+++ branches/soc-2011-pepper/source/blender/collada/AnimationImporter.cpp	2011-07-03 11:28:40 UTC (rev 38056)
@@ -570,8 +570,7 @@
 }
 
 //creates the rna_paths and array indices of fcurves from animations using transformation and bound animation class of each animation.
-void AnimationImporter:: Assign_transform_animations(std::vector<float>* frames, 
-													 COLLADAFW::Transformation * transform , 
+void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation * transform , 
 													 const COLLADAFW::AnimationList::AnimationBinding * binding,
 													 std::vector<FCurve*>* curves, bool is_joint, char * joint_path)
 {
@@ -588,10 +587,7 @@
 		return;
 	}
     
-	//find key frames of the animation and accumulates them to frames of the transformation.
-	find_frames (frames , curves );
-
-	char rna_path[100];
+    char rna_path[100];
 	//char joint_path[100];
 	
 						
@@ -706,25 +702,6 @@
 		return;
 	}
 
-	/*
-	float irest_dae[4][4];
-	float rest[4][4], irest[4][4];
-
-	if (is_joint) {
-		get_joint_rest_mat(irest_dae, root, node);
-		invert_m4(irest_dae);
-
-		Bone *bone = get_named_bone((bArmature*)ob->data, bone_name);
-		if (!bone) {
-			fprintf(stderr, "cannot find bone \"%s\"\n", bone_name);
-			return;
-		}
-
-		unit_m4(rest);
-		copy_m4_m4(rest, bone->arm_mat);
-		invert_m4_m4(irest, rest);
-	}*/
-    
 	const COLLADAFW::TransformationPointerArray& nodeTransforms = node->getTransformations();
 	
 	//for each transformation in node 
@@ -737,9 +714,6 @@
 			
 		const COLLADAFW::UniqueId& listid = transform->getAnimationList();
 		
-		//might not be needed
-		std::vector<float> frames;
-		        
 		//check if transformation has animations    
 		if (animlist_map.find(listid) == animlist_map.end()) continue ; 
 		else 
@@ -752,7 +726,7 @@
 				for (unsigned int j = 0; j < bindings.getCount(); j++) {
 					 animcurves = curve_map[bindings[j].animation];
 					//calculate rnapaths and array index of fcurves according to transformation and animation class
-					 Assign_transform_animations(&frames,transform, &bindings[j], &animcurves, is_joint, joint_path ); 
+					 Assign_transform_animations(transform, &bindings[j], &animcurves, is_joint, joint_path ); 
 					
 					 std::vector<FCurve*>::iterator iter;
 			            //Add the curves of the current animation to the object
@@ -764,7 +738,6 @@
 							 BLI_addtail(AnimCurves, fcu);	
 						}	 			
 				}
-			 std::sort(frames.begin(), frames.end());
 			}
 		if (is_rotation || is_matrix) {
 			if (is_joint) 

Modified: branches/soc-2011-pepper/source/blender/collada/AnimationImporter.h
===================================================================
--- branches/soc-2011-pepper/source/blender/collada/AnimationImporter.h	2011-07-03 11:07:34 UTC (rev 38055)
+++ branches/soc-2011-pepper/source/blender/collada/AnimationImporter.h	2011-07-03 11:28:40 UTC (rev 38056)
@@ -104,15 +104,10 @@
 	bool is_object_animated ( const COLLADAFW::Node * node , std::map<COLLADAFW::UniqueId,const COLLADAFW::Object*> FW_object_map ) ;
 
 
-	void Assign_transform_animations(std::vector<float>* frames, 
-		                             COLLADAFW::Transformation* transform , 
+	void Assign_transform_animations(COLLADAFW::Transformation* transform , 
 									 const COLLADAFW::AnimationList::AnimationBinding * binding,
 									 std::vector<FCurve*>* curves, bool is_joint, char * joint_path);
 
-	/*void Assign_transform_animations(std::vector<float>* frames, 
-														COLLADAFW::Transformation *transform , 
-														COLLADAFW::AnimationList::AnimationBinding * binding,
-														COLLADAFW::Node * node);*/
 	void modify_fcurve(std::vector<FCurve*>* curves , char* rna_path , int array_index );
 	// prerequisites:
 	// animlist_map - map animlist id -> animlist




More information about the Bf-blender-cvs mailing list