diff --git a/source/blender/editors/mesh/editmesh_tools.cc b/source/blender/editors/mesh/editmesh_tools.cc index 18eca394c45..7a4a1ce8fbd 100644 --- a/source/blender/editors/mesh/editmesh_tools.cc +++ b/source/blender/editors/mesh/editmesh_tools.cc @@ -2697,15 +2697,19 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) } } + /* NOTE: redundant calculation could be avoided if the EDBM API could skip calculation. */ + bool calc_normals = false; + /* apply mirror */ if (((Mesh *)obedit->data)->symmetry & ME_SYMMETRY_X) { EDBM_verts_mirror_apply(em, BM_ELEM_SELECT, 0); EDBM_verts_mirror_cache_end(em); + calc_normals = true; } EDBMUpdate_Params params{}; params.calc_looptris = true; - params.calc_normals = false; + params.calc_normals = calc_normals; params.is_destructive = false; EDBM_update(static_cast(obedit->data), ¶ms); } @@ -2815,15 +2819,19 @@ static int edbm_do_smooth_laplacian_vertex_exec(bContext *C, wmOperator *op) continue; } + /* NOTE: redundant calculation could be avoided if the EDBM API could skip calculation. */ + bool calc_normals = false; + /* Apply mirror. */ if (((Mesh *)obedit->data)->symmetry & ME_SYMMETRY_X) { EDBM_verts_mirror_apply(em, BM_ELEM_SELECT, 0); EDBM_verts_mirror_cache_end(em); + calc_normals = true; } EDBMUpdate_Params params{}; params.calc_looptris = true; - params.calc_normals = false; + params.calc_normals = calc_normals; params.is_destructive = false; EDBM_update(static_cast(obedit->data), ¶ms); }