[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51858] branches/soc-2012-bratwurst/source /blender/collada: Collada Code Fix

Sukhitha Jayathilake pr.jayathilake at gmail.com
Sun Nov 4 08:06:14 CET 2012


Revision: 51858
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51858
Author:   phabtar
Date:     2012-11-04 07:06:10 +0000 (Sun, 04 Nov 2012)
Log Message:
-----------
Collada Code Fix

Modified Paths:
--------------
    branches/soc-2012-bratwurst/source/blender/collada/AnimationExporter.cpp
    branches/soc-2012-bratwurst/source/blender/collada/ArmatureImporter.cpp
    branches/soc-2012-bratwurst/source/blender/collada/ControllerExporter.cpp
    branches/soc-2012-bratwurst/source/blender/collada/GeometryExporter.cpp

Modified: branches/soc-2012-bratwurst/source/blender/collada/AnimationExporter.cpp
===================================================================
--- branches/soc-2012-bratwurst/source/blender/collada/AnimationExporter.cpp	2012-11-04 06:21:09 UTC (rev 51857)
+++ branches/soc-2012-bratwurst/source/blender/collada/AnimationExporter.cpp	2012-11-04 07:06:10 UTC (rev 51858)
@@ -160,7 +160,7 @@
 { 
 	FCurve *fcu;
 	char *transformName;
-	Key *key = ob_get_key(ob);
+	Key *key = BKE_key_from_object(ob);
 	if(!key) return;
 
 	if(key->adt && key->adt->action){
@@ -1327,7 +1327,7 @@
 
 		//check shape key animation
 		if(!fcu){
-			Key *key = ob_get_key(ob);
+			Key *key = BKE_key_from_object(ob);
 			if(key && key->adt && key->adt->action)
 				fcu = (FCurve *)key->adt->action->curves.first;
 		}

Modified: branches/soc-2012-bratwurst/source/blender/collada/ArmatureImporter.cpp
===================================================================
--- branches/soc-2012-bratwurst/source/blender/collada/ArmatureImporter.cpp	2012-11-04 06:21:09 UTC (rev 51857)
+++ branches/soc-2012-bratwurst/source/blender/collada/ArmatureImporter.cpp	2012-11-04 07:06:10 UTC (rev 51858)
@@ -663,13 +663,13 @@
 		
 		Mesh *source_me = (Mesh*) source_ob->data;
 		//insert key to source mesh
-		Key *key = source_me->key = add_key((ID *)source_me);
+		Key *key = source_me->key = BKE_key_add((ID *)source_me);
 		key->type = KEY_RELATIVE;
 		KeyBlock *kb;
 		
 		//insert basis key
-		kb = add_keyblock_ctime(key, "Basis", FALSE);
-		mesh_to_key(source_me, kb);
+		kb = BKE_keyblock_add_ctime(key, "Basis", FALSE);
+		BKE_key_convert_from_mesh(source_me, kb);
 
 		//insert other shape keys
 		for ( int i = 0 ; i < morphTargetIds.getCount() ; i++ ){
@@ -679,8 +679,8 @@
 			
 			if(me){
 				me->key = key;
-				kb = add_keyblock_ctime(key, me->id.name, FALSE);
-				mesh_to_key(me, kb);
+				kb = BKE_keyblock_add_ctime(key, me->id.name, FALSE);
+				BKE_key_convert_from_mesh(me, kb);
 				
 				//apply weights
 				weight =  morphWeights.getFloatValues()->getData()[i];

Modified: branches/soc-2012-bratwurst/source/blender/collada/ControllerExporter.cpp
===================================================================
--- branches/soc-2012-bratwurst/source/blender/collada/ControllerExporter.cpp	2012-11-04 06:21:09 UTC (rev 51857)
+++ branches/soc-2012-bratwurst/source/blender/collada/ControllerExporter.cpp	2012-11-04 07:06:10 UTC (rev 51858)
@@ -118,7 +118,7 @@
 void ControllerExporter::operator()(Object *ob)
 {
 	Object *ob_arm = bc_get_assigned_armature(ob);
-	Key *key = ob_get_key(ob);
+	Key *key = BKE_key_from_object(ob);
 
 	if (ob_arm)
 		export_skin_controller(ob, ob_arm);

Modified: branches/soc-2012-bratwurst/source/blender/collada/GeometryExporter.cpp
===================================================================
--- branches/soc-2012-bratwurst/source/blender/collada/GeometryExporter.cpp	2012-11-04 06:21:09 UTC (rev 51857)
+++ branches/soc-2012-bratwurst/source/blender/collada/GeometryExporter.cpp	2012-11-04 07:06:10 UTC (rev 51858)
@@ -158,13 +158,13 @@
 	}
     
     //shape keys
-	Key * key = ob_get_key(ob);
+	Key * key = BKE_key_from_object(ob);
 	if(key){
 		KeyBlock * kb = (KeyBlock*)key->block.first;
 		//skip the basis
 		kb = kb->next;
 		for (; kb; kb = kb->next) {
-			key_to_mesh(kb, me);
+			BKE_key_convert_to_mesh(kb, me);
 			export_key_mesh(ob, me, kb);
 		}
 	}




More information about the Bf-blender-cvs mailing list