diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-12-04 21:48:21 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-12-04 21:48:21 +0300 |
commit | 5c3955452b0e93c3977afbb3294a19d8b20d8aea (patch) | |
tree | 927754d803dc1f60b80f73cdab8c63d15b6f7c2e /source/blender | |
parent | 34b73cb11ce50f2afefabec32aadb9a853eec177 (diff) | |
parent | 10c50d7dbf7578b35b3bf19a1948f556f9eb203b (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/collada/CMakeLists.txt | 12 | ||||
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 13 | ||||
-rw-r--r-- | source/blender/collada/DocumentImporter.h | 7 |
3 files changed, 30 insertions, 2 deletions
diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt index f860dfac08b..95edcff0555 100644 --- a/source/blender/collada/CMakeLists.txt +++ b/source/blender/collada/CMakeLists.txt @@ -25,6 +25,18 @@ remove_strict_flags() +FIND_FILE(_opencollada_with_animation_clip + NAMES + COLLADAFWAnimationClip.h + PATHS + ${OPENCOLLADA_INCLUDE_DIRS} + NO_DEFAULT_PATH + ) + +IF(_opencollada_with_animation_clip) + add_compile_definitions(OPENCOLLADA_WITH_ANIMATION_CLIP) +ENDIF() + set(INC . ../blenkernel diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 8eb9e5c969e..3df47b71598 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -1148,6 +1148,19 @@ bool DocumentImporter::writeAnimationList(const COLLADAFW::AnimationList *animat return anim_importer.write_animation_list(animationList); } +#if OPENCOLLADA_WITH_ANIMATION_CLIP +// Since opencollada 1.6.68 +// called on post-process stage after writeVisualScenes +bool DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip) +{ + if (mImportStage == Fetching_Controller_data) + return true; + + return true; + //return animation_clip_importer.write_animation_clip(animationClip); // TODO: implement import of AnimationClips +} +#endif + /** When this method is called, the writer must write the skin controller data. * \return The writer should return true, if writing succeeded, false otherwise.*/ bool DocumentImporter::writeSkinControllerData(const COLLADAFW::SkinControllerData *skin) diff --git a/source/blender/collada/DocumentImporter.h b/source/blender/collada/DocumentImporter.h index 26ded417aa6..374c184d4bc 100644 --- a/source/blender/collada/DocumentImporter.h +++ b/source/blender/collada/DocumentImporter.h @@ -49,8 +49,6 @@ #include "MeshImporter.h" #include "ImportSettings.h" - - struct bContext; /** Importer class. */ @@ -107,6 +105,11 @@ public: bool writeAnimationList(const COLLADAFW::AnimationList*); +#if OPENCOLLADA_WITH_ANIMATION_CLIP + // Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp) + bool DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip); +#endif + bool writeGeometry(const COLLADAFW::Geometry*); bool writeMaterial(const COLLADAFW::Material*); |