Bladeren bron

closes https://github.com/assimp/assimp/issues/1270: use HasTexture for
texture coordinates.

Kim Kulling 8 jaren geleden
bovenliggende
commit
81fd027860
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 1 1
      code/PlyLoader.cpp
  2. 2 2
      code/ValidateDataStructure.cpp

+ 1 - 1
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];

+ 2 - 2
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;
         }
     }