From 81fd027860441ea539e054128b59623b89273bbc Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 2 Aug 2017 11:35:57 +0200 Subject: [PATCH] closes https://github.com/assimp/assimp/issues/1270: use HasTexture for texture coordinates. --- code/PlyLoader.cpp | 2 +- code/ValidateDataStructure.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/PlyLoader.cpp b/code/PlyLoader.cpp index 0e99df7a9..937e839f5 100644 --- a/code/PlyLoader.cpp +++ b/code/PlyLoader.cpp @@ -537,7 +537,7 @@ void PLYImporter::LoadVertex(const PLY::Element* pcElement, const PLY::ElementIn if (haveTextureCoords) { - if (mGeneratedMesh->mTextureCoords[0] == NULL) + if (mGeneratedMesh->HasTextureCoords(0)) { mGeneratedMesh->mNumUVComponents[0] = 2; mGeneratedMesh->mTextureCoords[0] = new aiVector3D[mGeneratedMesh->mNumVertices]; diff --git a/code/ValidateDataStructure.cpp b/code/ValidateDataStructure.cpp index a536058bc..ae1e0d342 100644 --- a/code/ValidateDataStructure.cpp +++ b/code/ValidateDataStructure.cpp @@ -409,12 +409,12 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh) // the MSB flag is temporarily used by the extra verbose // mode to tell us that the JoinVerticesProcess might have // been executed already. - if ( !(this->mScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT ) && !(this->mScene->mFlags & AI_SCENE_FLAGS_ALLOW_SHARED) && + /*if ( !(this->mScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT ) && !(this->mScene->mFlags & AI_SCENE_FLAGS_ALLOW_SHARED) && abRefList[face.mIndices[a]]) { ReportError("aiMesh::mVertices[%i] is referenced twice - second " "time by aiMesh::mFaces[%i]::mIndices[%i]",face.mIndices[a],i,a); - } + }*/ abRefList[face.mIndices[a]] = true; } }