From 8083527f90d1556f576cf102d4143749677c45e0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 14 Jun 2021 22:56:01 +1000 Subject: Edit Mesh: use params arg for update function, add calc_normals arg Rename function EDBM_update_generic to EDBM_update, use a parameters argument for better readability. Also add calc_normals argument, which will have benefits when calculating normals and tessellation together is optimized. --- source/blender/editors/mesh/editmesh_automerge.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_automerge.c') diff --git a/source/blender/editors/mesh/editmesh_automerge.c b/source/blender/editors/mesh/editmesh_automerge.c index 2bd5b9b26ca..35fff1f8f3a 100644 --- a/source/blender/editors/mesh/editmesh_automerge.c +++ b/source/blender/editors/mesh/editmesh_automerge.c @@ -76,7 +76,12 @@ void EDBM_automerge(Object *obedit, bool update, const char hflag, const float d BMO_op_finish(bm, &weldop); if ((totvert_prev != bm->totvert) && update) { - EDBM_update_generic(obedit->data, true, true); + EDBM_update(obedit->data, + &(const struct EDBMUpdate_Params){ + .calc_looptri = true, + .calc_normals = false, + .is_destructive = true, + }); } } @@ -134,7 +139,12 @@ void EDBM_automerge_and_split(Object *obedit, #endif if (LIKELY(ok) && update) { - EDBM_update_generic(obedit->data, true, true); + EDBM_update(obedit->data, + &(const struct EDBMUpdate_Params){ + .calc_looptri = true, + .calc_normals = false, + .is_destructive = true, + }); } } -- cgit v1.2.3