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-07-05 16:37:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-07-05 16:45:21 +0300
commitdac81ad71b88d1ffa2ea2a4a22ede06dc4b56adb (patch)
tree00e7c2f96c8b325902012648a57d72394506c935 /source/blender/editors/mesh/editmesh_inset.c
parentd27db034440a70912014b06a799be5c36e88f231 (diff)
EditMesh: extract restore logic out of EDBM_redo_state_free
Split mesh restore logic into a new function: `EDBM_redo_state_restore_and_free`.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_inset.c')
-rw-r--r--source/blender/editors/mesh/editmesh_inset.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c
index 1c27ab00715..18f51ae9df2 100644
--- a/source/blender/editors/mesh/editmesh_inset.c
+++ b/source/blender/editors/mesh/editmesh_inset.c
@@ -209,7 +209,7 @@ static void edbm_inset_exit(bContext *C, wmOperator *op)
View3D *v3d = CTX_wm_view3d(C);
ARegion *region = CTX_wm_region(C);
for (uint ob_index = 0; ob_index < opdata->ob_store_len; ob_index++) {
- EDBM_redo_state_free(&opdata->ob_store[ob_index].mesh_backup, NULL, false);
+ EDBM_redo_state_free(&opdata->ob_store[ob_index].mesh_backup);
}
ED_region_draw_cb_exit(region->type, opdata->draw_handle_pixel);
if (v3d) {
@@ -235,7 +235,7 @@ static void edbm_inset_cancel(bContext *C, wmOperator *op)
for (uint ob_index = 0; ob_index < opdata->ob_store_len; ob_index++) {
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_redo_state_restore_and_free(&opdata->ob_store[ob_index].mesh_backup, em, true);
EDBM_update(obedit->data,
&(const struct EDBMUpdate_Params){
.calc_looptri = false,
@@ -276,7 +276,7 @@ static bool edbm_inset_calc(wmOperator *op)
BMEditMesh *em = BKE_editmesh_from_object(obedit);
if (opdata->is_modal) {
- EDBM_redo_state_restore(opdata->ob_store[ob_index].mesh_backup, em, false);
+ EDBM_redo_state_restore(&opdata->ob_store[ob_index].mesh_backup, em, false);
}
if (use_individual) {