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_select_similar.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_select_similar.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select_similar.c | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c index f3c0da67ecc..2ffeaa06751 100644 --- a/source/blender/editors/mesh/editmesh_select_similar.c +++ b/source/blender/editors/mesh/editmesh_select_similar.c @@ -497,7 +497,12 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) if (changed) { EDBM_selectmode_flush(em); - EDBM_update_generic(ob->data, false, false); + EDBM_update(ob->data, + &(const struct EDBMUpdate_Params){ + .calc_looptri = false, + .calc_normals = false, + .is_destructive = false, + }); } } @@ -519,7 +524,12 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) } } EDBM_selectmode_flush(em); - EDBM_update_generic(ob->data, false, false); + EDBM_update(ob->data, + &(const struct EDBMUpdate_Params){ + .calc_looptri = false, + .calc_normals = false, + .is_destructive = false, + }); } } @@ -917,7 +927,12 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) if (changed) { EDBM_selectmode_flush(em); - EDBM_update_generic(ob->data, false, false); + EDBM_update(ob->data, + &(const struct EDBMUpdate_Params){ + .calc_looptri = false, + .calc_normals = false, + .is_destructive = false, + }); } } @@ -939,7 +954,12 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) } } EDBM_selectmode_flush(em); - EDBM_update_generic(ob->data, false, false); + EDBM_update(ob->data, + &(const struct EDBMUpdate_Params){ + .calc_looptri = false, + .calc_normals = false, + .is_destructive = false, + }); } } @@ -1213,7 +1233,12 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) if (changed) { EDBM_selectmode_flush(em); - EDBM_update_generic(ob->data, false, false); + EDBM_update(ob->data, + &(const struct EDBMUpdate_Params){ + .calc_looptri = false, + .calc_normals = false, + .is_destructive = false, + }); } } |