fix T58568 build errors when using collada 1.6.68 or newer

This commit is contained in:
Gaia Clary 2018-12-04 19:11:33 +01:00
parent 8908670623
commit 10c50d7dbf
Notes: blender-bot 2023-02-14 06:00:50 +01:00
Referenced by issue #58568, Add support for opencollada >= 1.6.65
3 changed files with 30 additions and 2 deletions

View File

@ -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

View File

@ -1349,6 +1349,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 != General)
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)

View File

@ -49,8 +49,6 @@
#include "MeshImporter.h"
#include "ImportSettings.h"
struct bContext;
/** Importer class. */
@ -108,6 +106,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*);