Fix #144385: "Reorder Mesh Spatially" broken with loose vertices
Fixes missing isolated vertices in `mesh_apply_spatial_organization` by ensuring non-added vertices (ones not forming a face) are appended to new_vert_order, preserving correct vertex ordering for meshes with disconnected geometry. Pull Request: https://projects.blender.org/blender/blender/pulls/144388
This commit is contained in:
committed by
Hans Goudey
parent
0d8a19c790
commit
4a8490f5bd
@@ -858,6 +858,13 @@ void mesh_apply_spatial_organization(Mesh &mesh)
|
||||
}
|
||||
}
|
||||
|
||||
for (const int vert : IndexRange(mesh.verts_num)) {
|
||||
if (!added_verts[vert]) {
|
||||
new_vert_order.append(vert);
|
||||
added_verts[vert].set();
|
||||
}
|
||||
}
|
||||
|
||||
for (const int face_idx : local_group.faces) {
|
||||
new_face_order.append(face_idx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user