From 01234b430b506daf692fada162a73846109c03c3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 22 Jun 2021 18:25:15 +1000 Subject: Fix T89345: Edit-mesh decimate doesn't update face normals Invalid face normals were used for tessellation. --- source/blender/bmesh/tools/bmesh_decimate_collapse.c | 5 +++++ source/blender/editors/mesh/editmesh_tools.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index 869856d0c5b..bc497c38e7a 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -1285,6 +1285,11 @@ static bool bm_decim_edge_collapse(BMesh *bm, * a vertex group is the usual source for this. * \param symmetry_axis: Axis of symmetry, -1 to disable mirror decimate. * \param symmetry_eps: Threshold when matching mirror verts. + * + * \note The caller is responsible for recalculating face and vertex normals. + * - Vertex normals are maintained while decimating, + * although they won't necessarily match the final recalculated normals. + * - Face normals are not maintained at all. */ void BM_mesh_decimate_collapse(BMesh *bm, const float factor, diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index d4491721689..a3643b3bc8e 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -5823,7 +5823,7 @@ static int edbm_decimate_exec(bContext *C, wmOperator *op) EDBM_update(obedit->data, &(const struct EDBMUpdate_Params){ .calc_looptri = true, - .calc_normals = false, + .calc_normals = true, .is_destructive = true, }); } -- cgit v1.2.3