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/include/ED_mesh.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/include/ED_mesh.h') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index b8e9f6e8871..b76c35c7d7a 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -103,7 +103,14 @@ bool EDBM_vert_color_check(struct BMEditMesh *em); bool EDBM_mesh_hide(struct BMEditMesh *em, bool swap); bool EDBM_mesh_reveal(struct BMEditMesh *em, bool select); -void EDBM_update_generic(struct Mesh *me, const bool do_tessellation, const bool is_destructive); +struct EDBMUpdate_Params { + uint calc_looptri : 1; + uint calc_normals : 1; + uint is_destructive : 1; +}; + +void EDBM_update(struct Mesh *me, const struct EDBMUpdate_Params *params); +void EDBM_update_extern(struct Mesh *me, const bool do_tessellation, const bool is_destructive); struct UvElementMap *BM_uv_element_map_create(struct BMesh *bm, const struct Scene *scene, -- cgit v1.2.3