|
@@ -188,12 +188,15 @@ void SortByPTypeProcess::Execute(aiScene *pScene) {
|
|
|
|
|
|
unsigned int numPolyVerts = 0;
|
|
unsigned int numPolyVerts = 0;
|
|
for (; pFirstFace != pLastFace; ++pFirstFace) {
|
|
for (; pFirstFace != pLastFace; ++pFirstFace) {
|
|
- if (pFirstFace->mNumIndices <= 3)
|
|
|
|
|
|
+ if (pFirstFace->mNumIndices >= 1 && pFirstFace->mNumIndices <= 3)
|
|
++aiNumPerPType[pFirstFace->mNumIndices - 1];
|
|
++aiNumPerPType[pFirstFace->mNumIndices - 1];
|
|
else {
|
|
else {
|
|
++aiNumPerPType[3];
|
|
++aiNumPerPType[3];
|
|
numPolyVerts += pFirstFace->mNumIndices;
|
|
numPolyVerts += pFirstFace->mNumIndices;
|
|
}
|
|
}
|
|
|
|
+ if (pFirstFace->mNumIndices == 0) {
|
|
|
|
+ ASSIMP_LOG_WARN("Face with 0 indices treated as polygon");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
VertexWeightTable *avw = ComputeVertexBoneWeightTable(mesh);
|
|
VertexWeightTable *avw = ComputeVertexBoneWeightTable(mesh);
|