diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-03-07 03:21:52 +0400 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-03-07 03:21:52 +0400 |
commit | 8664d4b98ba6cdcde44a6878dbdf4d8327a1f96e (patch) | |
tree | 6f9ba6771a106311dc0326606f42f7b1644bdd17 /source/blender/collada/DocumentExporter.cpp | |
parent | 65869589b6bc0caf9a08a10415a18dc563a447cf (diff) |
Collada: Added option for how rot,loc,trans data is exported (improves flexibility for support of other 3D tools)
Diffstat (limited to 'source/blender/collada/DocumentExporter.cpp')
-rw-r--r-- | source/blender/collada/DocumentExporter.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp index 09aec2a43a7..c03316e1fe5 100644 --- a/source/blender/collada/DocumentExporter.cpp +++ b/source/blender/collada/DocumentExporter.cpp @@ -266,7 +266,7 @@ void DocumentExporter::exportCurrentScene(Scene *sce) // <library_animations> AnimationExporter ae(&sw, this->export_settings); - ae.exportAnimations(sce); + bool has_animations = ae.exportAnimations(sce); // <library_controllers> ArmatureExporter arm_exporter(&sw, this->export_settings); @@ -279,6 +279,19 @@ void DocumentExporter::exportCurrentScene(Scene *sce) // <library_visual_scenes> SceneExporter se(&sw, &arm_exporter, this->export_settings); + + if (has_animations && this->export_settings->export_transformation_type == BC_TRANSFORMATION_TYPE_MATRIX) { + // channels adressing <matrix> objects is not (yet) supported + // So we force usage of <location>, <translation> and <scale> + fprintf(stdout, + "For animated Ojects we must use decomposed <matrix> elements,\n" \ + "Forcing usage of TransLocRot transformation type."); + se.setExportTransformationType(BC_TRANSFORMATION_TYPE_TRANSROTLOC); + } + else { + se.setExportTransformationType(this->export_settings->export_transformation_type); + } + se.exportScene(sce); // <scene> |