From 64cd927519748bbd50b856c25f7e4eac17d8c780 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 22 Mar 2022 09:33:50 -0500 Subject: 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 --- source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpencil_modifiers/intern/lineart') diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c index 2f648d7ed4b..c96321b67aa 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c @@ -1753,6 +1753,7 @@ static void lineart_geometry_object_load(LineartObjectInfo *obi, LineartRenderBu obi->original_me, &((struct BMeshFromMeshParams){ .calc_face_normal = true, + .calc_vert_normal = true, })); } -- cgit v1.2.3