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/mesh/editmesh_bevel.c
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/mesh/editmesh_bevel.c')
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 43492cd57af..110f1975d8d 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -403,9 +403,12 @@ static bool edbm_bevel_calc(wmOperator *op)
continue;
}
- EDBM_mesh_normals_update(em);
-
- EDBM_update_generic(obedit->data, true, true);
+ EDBM_update(obedit->data,
+ &(const struct EDBMUpdate_Params){
+ .calc_looptri = true,
+ .calc_normals = true,
+ .is_destructive = true,
+ });
changed = true;
}
return changed;
@@ -454,7 +457,12 @@ static void edbm_bevel_cancel(bContext *C, wmOperator *op)
Object *obedit = opdata->ob_store[ob_index].ob;
BMEditMesh *em = BKE_editmesh_from_object(obedit);
EDBM_redo_state_free(&opdata->ob_store[ob_index].mesh_backup, em, true);
- EDBM_update_generic(obedit->data, false, true);
+ EDBM_update(obedit->data,
+ &(const struct EDBMUpdate_Params){
+ .calc_looptri = false,
+ .calc_normals = true,
+ .is_destructive = true,
+ });
}
}