Fix T89345: Edit-mesh decimate doesn't update face normals

Invalid face normals were used for tessellation.
This commit is contained in:
Campbell Barton 2021-06-22 18:25:15 +10:00
parent 956c539e59
commit 01234b430b
Notes: blender-bot 2023-02-14 10:14:07 +01:00
Referenced by issue #89345, Non-planar faces cause assertion failure when decimating
2 changed files with 6 additions and 1 deletions

View File

@ -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,

View File

@ -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,
});
}