diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-02-26 18:34:45 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-02-26 19:16:56 +0300 |
commit | a024da55af09fb75e3b72489a8696878909bf676 (patch) | |
tree | cf9cfcccbba2323816a19647770e07d6b5d3c6e7 /source/blender/collada/DocumentExporter.cpp | |
parent | 5f9657316e4e53594643cf1bb128135a593bcae5 (diff) |
Adding support for Matrix Transformation export
The exporter does export matrix data (4*4 Transformation matrix) only for Skeletal animation. For object animation only exporting to trans/rot/loc is implemented.
This task implements Matrix export also for simple Object animation.
Differential Revision: https://developer.blender.org/D3082
Diffstat (limited to 'source/blender/collada/DocumentExporter.cpp')
-rw-r--r-- | source/blender/collada/DocumentExporter.cpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp index 957fec50e4b..7ed5d8ff693 100644 --- a/source/blender/collada/DocumentExporter.cpp +++ b/source/blender/collada/DocumentExporter.cpp @@ -302,29 +302,11 @@ int DocumentExporter::exportCurrentScene(Scene *sce) SceneExporter se(writer, &arm_exporter, this->export_settings); - // <library_animations> - AnimationExporter ae(writer, this->export_settings); - -#if 0 - bool has_animations = ae.exportAnimations(sce); - /* The following code seems to be an obsolete workaround - Comment out until it proofs correct that we no longer need it. - */ - 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); + if (this->export_settings->include_animations) { + // <library_animations> + AnimationExporter ae(writer, this->export_settings); + ae.exportAnimations(sce); } - else { - se.setExportTransformationType(this->export_settings->export_transformation_type); - } -#else - ae.exportAnimations(sce); - se.setExportTransformationType(this->export_settings->export_transformation_type); -#endif se.exportScene(sce); // <scene> |