Skip to content

Commit

Permalink
Adjust ASE importer to parse only the relevant *MESH_FACE parts and l…
Browse files Browse the repository at this point in the history
…eave the rest alone
  • Loading branch information
codereader committed Apr 28, 2021
1 parent a646103 commit 87ab248
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion radiantcore/model/import/AseModel.cpp
Expand Up @@ -410,7 +410,16 @@ void AseModel::parseMesh(Mesh& mesh, parser::StringTokeniser& tokeniser)
if (face.vertexIndices[1] >= mesh.vertices.size()) throw parser::ParseException("MESH_FACE vertex index 1 out of bounds >= MESH_NUMFACES");
if (face.vertexIndices[0] >= mesh.vertices.size()) throw parser::ParseException("MESH_FACE vertex index 2 out of bounds >= MESH_NUMFACES");

tokeniser.skipTokens(9);
// Skip over the edge stuff
tokeniser.assertNextToken("AB:");
tokeniser.skipTokens(1);
tokeniser.assertNextToken("BC:");
tokeniser.skipTokens(1);
tokeniser.assertNextToken("CA:");
tokeniser.skipTokens(1);

// Leave the rest of the line (*MESH_MTLID and *MESH_SMOOTHING) unparsed,
// and let the outer loop deal with any keywords that might follow or might not follow
}
/* model texture vertex */
else if (token == "*mesh_tvert")
Expand Down

0 comments on commit 87ab248

Please sign in to comment.