closes https://github.com/assimp/assimp/issues/1270: use HasTexture for
texture coordinates.pull/1370/head
parent
232954c15e
commit
81fd027860
|
@ -537,7 +537,7 @@ void PLYImporter::LoadVertex(const PLY::Element* pcElement, const PLY::ElementIn
|
||||||
|
|
||||||
if (haveTextureCoords)
|
if (haveTextureCoords)
|
||||||
{
|
{
|
||||||
if (mGeneratedMesh->mTextureCoords[0] == NULL)
|
if (mGeneratedMesh->HasTextureCoords(0))
|
||||||
{
|
{
|
||||||
mGeneratedMesh->mNumUVComponents[0] = 2;
|
mGeneratedMesh->mNumUVComponents[0] = 2;
|
||||||
mGeneratedMesh->mTextureCoords[0] = new aiVector3D[mGeneratedMesh->mNumVertices];
|
mGeneratedMesh->mTextureCoords[0] = new aiVector3D[mGeneratedMesh->mNumVertices];
|
||||||
|
|
|
@ -409,12 +409,12 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
|
||||||
// the MSB flag is temporarily used by the extra verbose
|
// the MSB flag is temporarily used by the extra verbose
|
||||||
// mode to tell us that the JoinVerticesProcess might have
|
// mode to tell us that the JoinVerticesProcess might have
|
||||||
// been executed already.
|
// 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]])
|
abRefList[face.mIndices[a]])
|
||||||
{
|
{
|
||||||
ReportError("aiMesh::mVertices[%i] is referenced twice - second "
|
ReportError("aiMesh::mVertices[%i] is referenced twice - second "
|
||||||
"time by aiMesh::mFaces[%i]::mIndices[%i]",face.mIndices[a],i,a);
|
"time by aiMesh::mFaces[%i]::mIndices[%i]",face.mIndices[a],i,a);
|
||||||
}
|
}*/
|
||||||
abRefList[face.mIndices[a]] = true;
|
abRefList[face.mIndices[a]] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue