Fix: Sculpt spatial reodering crash after recent fix
Caused by #144388. Move the for loop such that isolated vertices are processed in the end, after the face groups are done processing their vertices. Pull Request: https://projects.blender.org/blender/blender/pulls/144463
This commit is contained in:
committed by
Hans Goudey
parent
1b2856f566
commit
e4c763ff23
@@ -858,19 +858,19 @@ 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);
|
||||
}
|
||||
group_face_offsets.append(new_face_order.size());
|
||||
}
|
||||
|
||||
for (const int vert : IndexRange(mesh.verts_num)) {
|
||||
if (!added_verts[vert]) {
|
||||
new_vert_order.append(vert);
|
||||
added_verts[vert].set();
|
||||
}
|
||||
}
|
||||
|
||||
Array<int> vert_reverse_map(mesh.verts_num);
|
||||
for (const int i : IndexRange(mesh.verts_num)) {
|
||||
vert_reverse_map[new_vert_order[i]] = i;
|
||||
|
||||
Reference in New Issue
Block a user