diff options
author | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-08-28 22:30:18 +0400 |
---|---|---|
committer | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-08-28 22:30:18 +0400 |
commit | ca79dee61f11227be0ed4cc5b1241fa748124da0 (patch) | |
tree | 77c48b08e7bbca739e1accb98e72753a347ac059 /source/blender | |
parent | b4b046995b21d59e315eb71ed08fc1ae066c891b (diff) |
armature object animation bug fix.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/collada/AnimationExporter.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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"))) |