diff options
author | Hans Goudey <h.goudey@me.com> | 2022-01-27 20:02:10 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-11 01:28:41 +0300 |
commit | 2cff30a6667c9fb5f84386461ae909a48c4db2e3 (patch) | |
tree | ae62d5b7932d38f7b66ab03a29f303159a733573 /source/blender/blenkernel/intern | |
parent | 5a198984a2bee738e9b441ab74d5142f14780255 (diff) |
Fix T95212: Mirror modifier normals crash
The vertex and face normals from the input mesh
were used to calculate the normals on the result,
which could cause a crash because the result should
be about twice as large.
Also remove an unnecessary dirty tag, since it is handled
automatically when creating a new mesh or in the case
of the mirror modifier, when calculating the new custom
face corner normals.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_mirror.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/mesh_mirror.c b/source/blender/blenkernel/intern/mesh_mirror.c index abc0b518d92..ec3655ac491 100644 --- a/source/blender/blenkernel/intern/mesh_mirror.c +++ b/source/blender/blenkernel/intern/mesh_mirror.c @@ -420,7 +420,7 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd, /* calculate custom normals into loop_normals, then mirror first half into second half */ BKE_mesh_normals_loop_split(result->mvert, - BKE_mesh_vertex_normals_ensure(mesh), + BKE_mesh_vertex_normals_ensure(result), result->totvert, result->medge, result->totedge, @@ -428,7 +428,7 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd, loop_normals, totloop, result->mpoly, - BKE_mesh_poly_normals_ensure(mesh), + BKE_mesh_poly_normals_ensure(result), totpoly, true, mesh->smoothresh, |