diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2017-01-28 23:51:18 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2017-01-28 23:51:18 +0300 |
commit | c64c901535505db3087b621b7d2ccf14a28c2683 (patch) | |
tree | 19714a6e8ec5d8e6f35b5d7580ef45a8f92b12a8 /source/blender/collada | |
parent | e4e19000129569d9b1a33effd9f25c4847203949 (diff) |
fix D2489: Collada exporter broke edit data when exporting Armature while in Armature edit mode
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/ArmatureExporter.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp index 4f5cf83f5ca..35cf7dd7622 100644 --- a/source/blender/collada/ArmatureExporter.cpp +++ b/source/blender/collada/ArmatureExporter.cpp @@ -69,7 +69,10 @@ void ArmatureExporter::add_armature_bones(Object *ob_arm, Scene *sce, // write bone nodes bArmature * armature = (bArmature *)ob_arm->data; - ED_armature_to_edit(armature); + bool is_edited = armature->edbo != NULL; + + if (!is_edited) + ED_armature_to_edit(armature); bArmature *arm = (bArmature *)ob_arm->data; for (Bone *bone = (Bone *)arm->bonebase.first; bone; bone = bone->next) { @@ -78,8 +81,10 @@ void ArmatureExporter::add_armature_bones(Object *ob_arm, Scene *sce, add_bone_node(bone, ob_arm, sce, se, child_objects); } - ED_armature_from_edit(armature); - ED_armature_edit_free(armature); + if (!is_edited) { + ED_armature_from_edit(armature); + ED_armature_edit_free(armature); + } } void ArmatureExporter::write_bone_URLs(COLLADASW::InstanceController &ins, Object *ob_arm, Bone *bone) |