Fix cloth regression after removing mvert pointers in Mesh.

This is an obvious editing mistake introduced in 05952aa94d,
resulting in incorrect vertex coordinates used when raycasting
for internal springs with a rest shape key.
This commit is contained in:
Alexander Gavrilov 2022-12-25 18:29:41 +02:00
parent 9e0feec0d3
commit 87cf495860
1 changed files with 1 additions and 1 deletions

View File

@ -1168,7 +1168,7 @@ static Mesh *cloth_make_rest_mesh(ClothModifierData *clmd, Mesh *mesh)
{
Mesh *new_mesh = BKE_mesh_copy_for_eval(mesh, false);
ClothVertex *verts = clmd->clothObject->verts;
MVert *mvert = BKE_mesh_verts_for_write(mesh);
MVert *mvert = BKE_mesh_verts_for_write(new_mesh);
/* vertex count is already ensured to match */
for (uint i = 0; i < mesh->totvert; i++, verts++) {