diff options
author | Hans Goudey <h.goudey@me.com> | 2022-03-22 17:33:50 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-03-22 17:33:50 +0300 |
commit | 64cd927519748bbd50b856c25f7e4eac17d8c780 (patch) | |
tree | ca23f3b5d63c5d6a01afcb8aa0177a84ee01851f /source/blender/blenkernel/intern/multires_unsubdivide.c | |
parent | 86d87fcbdbd5f4a18d2fdcc4f827d9bee6b5ed32 (diff) |
Fix T96308: Mesh to BMesh conversion doesn't calculate vertex normals
Currently there is a "calc_face_normal" argument to mesh to bmesh
conversion, but vertex normals had always implicitly inherited whatever
dirty state the mesh input's vertex normals were in. Probably they were
most often assumed to not be dirty, but this was never really correct in
the general case.
Ever since the refactor to move vertex normals out of mesh vertices,
cfa53e0fbeed7178c7, the copying logic has been explicit: copy the
normals when they are not dirty. But it turns out that more control is
needed, and sometimes normals should be calculated for the resulting
BMesh.
This commit adds an option to the conversion to calculate vertex
normals, true by default. In almost all places except the decimate
and edge split modifiers, I just copied the value of the
"calc_face_normals" argument.
Differential Revision: https://developer.blender.org/D14406
Diffstat (limited to 'source/blender/blenkernel/intern/multires_unsubdivide.c')
-rw-r--r-- | source/blender/blenkernel/intern/multires_unsubdivide.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/multires_unsubdivide.c b/source/blender/blenkernel/intern/multires_unsubdivide.c index 80926bfc1e2..cad680ecedd 100644 --- a/source/blender/blenkernel/intern/multires_unsubdivide.c +++ b/source/blender/blenkernel/intern/multires_unsubdivide.c @@ -869,6 +869,7 @@ static BMesh *get_bmesh_from_mesh(Mesh *mesh) mesh, (&(struct BMeshFromMeshParams){ .calc_face_normal = true, + .calc_vert_normal = true, })); return bm; |