Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-06-22 11:25:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-22 11:27:52 +0300
commit01234b430b506daf692fada162a73846109c03c3 (patch)
tree395217f7635eac1975d5a1d4ccae7ac6b1800eac
parent956c539e597aed84c355c8336dfd5797f4e69ea7 (diff)
Fix T89345: Edit-mesh decimate doesn't update face normals
Invalid face normals were used for tessellation.
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c5
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c2
2 files changed, 6 insertions, 1 deletions
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,
});
}