Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-06-14 15:56:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-14 15:56:01 +0300
commit8083527f90d1556f576cf102d4143749677c45e0 (patch)
tree347f2be8a4aaa305a8e6a1125dbf5f7fb3174b13 /source/blender/editors/uvedit
parent1d2eb461b528cc309ad6d2fa94ce1e910e93d8be (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/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 708f04bf044..80fbfd3d28c 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1469,7 +1469,12 @@ static int uv_hide_exec(bContext *C, wmOperator *op)
if (ts->uv_flag & UV_SYNC_SELECTION) {
if (EDBM_mesh_hide(em, swap)) {
- EDBM_update_generic(ob->data, true, false);
+ EDBM_update(ob->data,
+ &(const struct EDBMUpdate_Params){
+ .calc_looptri = true,
+ .calc_normals = false,
+ .is_destructive = false,
+ });
}
continue;
}
@@ -1607,7 +1612,12 @@ static int uv_reveal_exec(bContext *C, wmOperator *op)
/* call the mesh function if we are in mesh sync sel */
if (ts->uv_flag & UV_SYNC_SELECTION) {
if (EDBM_mesh_reveal(em, select)) {
- EDBM_update_generic(ob->data, true, false);
+ EDBM_update(ob->data,
+ &(const struct EDBMUpdate_Params){
+ .calc_looptri = true,
+ .calc_normals = false,
+ .is_destructive = false,
+ });
}
continue;
}