From 80892ede94a28edcdd0e6ed08de40b75ded972e3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 4 Dec 2021 13:31:09 +0200 Subject: [PATCH] assimp: Support compilation with Assimp 5.x Closes #1212 --- pandatool/src/assimp/pandaLogger.cxx | 9 +++++++++ pandatool/src/assimp/pandaLogger.h | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/pandatool/src/assimp/pandaLogger.cxx b/pandatool/src/assimp/pandaLogger.cxx index 2b92cfbc17..04745e2bc8 100644 --- a/pandatool/src/assimp/pandaLogger.cxx +++ b/pandatool/src/assimp/pandaLogger.cxx @@ -38,6 +38,15 @@ void PandaLogger::OnDebug(const char *message) { assimp_cat.debug() << message << "\n"; } +/** + * + */ +void PandaLogger::OnVerboseDebug(const char *message) { + if (assimp_cat.is_spam()) { + assimp_cat.spam() << message << "\n"; + } +} + /** * */ diff --git a/pandatool/src/assimp/pandaLogger.h b/pandatool/src/assimp/pandaLogger.h index dbd2165ce6..2fdbd44609 100644 --- a/pandatool/src/assimp/pandaLogger.h +++ b/pandatool/src/assimp/pandaLogger.h @@ -30,11 +30,17 @@ protected: INLINE bool attachStream(Assimp::LogStream*, unsigned int) { return false; }; + INLINE bool detachStream(Assimp::LogStream*, unsigned int) { + return false; + }; + + // Kept for compatibility with Assimp 4.x INLINE bool detatchStream(Assimp::LogStream*, unsigned int) { return false; }; void OnDebug(const char *message); + void OnVerboseDebug(const char *message); void OnError(const char *message); void OnInfo(const char *message); void OnWarn(const char *message);