Fix: Collada import assert with faceless prims #120738
@ -642,6 +642,10 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh,
|
||||
|
||||
int collada_meshtype = mp->getPrimitiveType();
|
||||
|
||||
if (collada_meshtype == COLLADAFW::MeshPrimitive::LINES) {
|
||||
continue; /* read the lines later after all the rest is done */
|
||||
}
|
||||
|
||||
/* Since we cannot set `poly->mat_nr` here, we store a portion of `mesh->mpoly` in Primitive.
|
||||
*/
|
||||
Primitive prim = {face_index, &material_indices.span[face_index], 0};
|
||||
@ -793,10 +797,6 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh,
|
||||
}
|
||||
}
|
||||
|
||||
else if (collada_meshtype == COLLADAFW::MeshPrimitive::LINES) {
|
||||
continue; /* read the lines later after all the rest is done */
|
||||
}
|
||||
|
||||
if (mp_has_faces) {
|
||||
mat_prim_map[mp->getMaterialId()].push_back(prim);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user