diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-14 15:56:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-14 15:56:01 +0300 |
commit | 8083527f90d1556f576cf102d4143749677c45e0 (patch) | |
tree | 347f2be8a4aaa305a8e6a1125dbf5f7fb3174b13 /source/blender/editors/mesh/editmesh_knife.c | |
parent | 1d2eb461b528cc309ad6d2fa94ce1e910e93d8be (diff) |
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.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_knife.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index ae824cad50b..f7cc95af619 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -2805,8 +2805,12 @@ static void knifetool_finish_ex(KnifeTool_OpData *kcd) knife_make_cuts(kcd); EDBM_selectmode_flush(kcd->em); - EDBM_mesh_normals_update(kcd->em); - EDBM_update_generic(kcd->ob->data, true, true); + EDBM_update(kcd->ob->data, + &(const struct EDBMUpdate_Params){ + .calc_looptri = true, + .calc_normals = true, + .is_destructive = true, + }); /* Re-tessellating makes this invalid, don't use again by accident. */ knifetool_free_bmbvh(kcd); |