Handle empty face groups, such as in the rama cyclinder that crashed the Friday meeting (http://headache.hungry.com/~seth/hifi/stickCollisionModel.obj).

This commit is contained in:
Howard Stearns 2015-05-09 13:16:34 -07:00
parent 72e1ea688a
commit c0a71da9e3

View file

@ -386,8 +386,9 @@ bool OBJReader::parseOBJGroup(OBJTokenizer& tokenizer, const QVariantHash& mappi
done:
if (faces.count() == 0) { // empty mesh
mesh.parts.pop_back();
} else {
faceGroups.append(faces); // We're done with this group. Add the faces.
}
faceGroups.append(faces); // We're done with this group. Add the faces.
//qCDebug(modelformat) << "end group:" << meshPart.materialID << " original faces:" << originalFaceCountForDebugging << " triangles:" << faces.count() << " keep going:" << result;
return result;
}