Allow empty slots in mTextureCoords (#5636)
* Allow empty slots in aiMesh::mTextureCoords. 1.Explicitly say in documentation that empty slots are allowed (it was unclear). 2.Change GetNumUVChannels() implementation to allow empty slots. 3.Revert fraction of2da2835b29where empty slots are detected and error logged. * Fix #5632 by reverting fraction ofd6aacefa1ewhere Collada texcoords are renumbered to avoid empty slots. --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
This commit is contained in:
@@ -371,20 +371,7 @@ void ValidateDSProcess::Validate(const aiMesh *pMesh) {
|
||||
ReportWarning("There are unreferenced vertices");
|
||||
}
|
||||
|
||||
// texture channel 2 may not be set if channel 1 is zero ...
|
||||
{
|
||||
unsigned int i = 0;
|
||||
for (; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) {
|
||||
if (!pMesh->HasTextureCoords(i)) break;
|
||||
}
|
||||
for (; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i)
|
||||
if (pMesh->HasTextureCoords(i)) {
|
||||
ReportError("Texture coordinate channel %i exists "
|
||||
"although the previous channel was nullptr.",
|
||||
i);
|
||||
}
|
||||
}
|
||||
// the same for the vertex colors
|
||||
// vertex color channel 2 may not be set if channel 1 is zero ...
|
||||
{
|
||||
unsigned int i = 0;
|
||||
for (; i < AI_MAX_NUMBER_OF_COLOR_SETS; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user