From e66dc5c9ad9048dbfb6e7043f61531198fe8a68f Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 11 Jul 2017 10:42:10 +0200 Subject: [PATCH] Collada: add workaround to deal with polygon with holes . --- code/ColladaLoader.cpp | 1 - code/ColladaParser.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index 5cec0a0c6..e82bf1560 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -132,7 +132,6 @@ void ColladaLoader::SetupProperties(const Importer* pImp) ignoreUpDirection = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION,0) != 0; } - // ------------------------------------------------------------------------------------------------ // Get file extension list const aiImporterDesc* ColladaLoader::GetInfo () const diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 851a31edd..dbbbdcb18 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -44,7 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief Implementation of the Collada parser helper */ - #ifndef ASSIMP_BUILD_NO_COLLADA_IMPORTER #include @@ -1866,7 +1865,7 @@ void ColladaParser::ReadMesh( Mesh* pMesh) ReadIndexData( pMesh); } else { - // ignore the rest + // ignore the restf SkipElement(); } } @@ -2216,8 +2215,9 @@ void ColladaParser::ReadIndexData( Mesh* pMesh) else if (IsElement("extra")) { SkipElement("extra"); - } else - { + } else if ( IsElement("ph")) { + SkipElement("ph"); + } else { ThrowException( format() << "Unexpected sub element <" << mReader->getNodeName() << "> in tag <" << elementName << ">" ); } }