From ca79dee61f11227be0ed4cc5b1241fa748124da0 Mon Sep 17 00:00:00 2001 From: Sukhitha Prabhath Jayathilake Date: Sun, 28 Aug 2011 18:30:18 +0000 Subject: armature object animation bug fix. --- source/blender/collada/AnimationExporter.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index bbd6fef803f..c6f108306be 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -71,14 +71,15 @@ void AnimationExporter::operator() (Object *ob) bArmature *arm = (bArmature*)ob->data; for (Bone *bone = (Bone*)arm->bonebase.first; bone; bone = bone->next) write_bone_animation_matrix(ob, bone); - - transformName = fcu->rna_path; } - else - transformName = extract_transform_name( fcu->rna_path ); while (fcu) { - transformName = extract_transform_name( fcu->rna_path ); + //for armature animations as objects + if ( ob->type == OB_ARMATURE ) + transformName = fcu->rna_path; + else + transformName = extract_transform_name( fcu->rna_path ); + if ((!strcmp(transformName, "location") || !strcmp(transformName, "scale")) || (!strcmp(transformName, "rotation_euler") && ob->rotmode == ROT_MODE_EUL)|| (!strcmp(transformName, "rotation_quaternion"))) -- cgit v1.2.3