Fix Alembic crash when importing a SubD mesh
The counters for polygons count and face corners count were inverted, leading to various out of bounds accesses due to wrong data size allocation. Not sure where the bug comes from, whether it's original, or a typo from some refactor.
This commit is contained in:
@@ -1133,7 +1133,7 @@ Mesh *AbcSubDReader::read_mesh(Mesh *existing_mesh,
|
||||
|
||||
if (existing_mesh->totvert != positions->size()) {
|
||||
new_mesh = BKE_mesh_new_nomain_from_template(
|
||||
existing_mesh, positions->size(), 0, face_indices->size(), face_counts->size());
|
||||
existing_mesh, positions->size(), 0, face_counts->size(), face_indices->size());
|
||||
|
||||
settings.read_flag |= MOD_MESHSEQ_READ_ALL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user