diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-13 08:05:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-13 08:13:33 +0300 |
commit | 7a084c2eee266cac01ade0fed3527586b9e2e0d2 (patch) | |
tree | 2c027fcb27a74b4b9901c2c24695c3e2f82515d5 /source/blender/editors/mesh/editmesh_undo.c | |
parent | b90b1af25c8eeb243a748c61af7879eb89ef9d4b (diff) |
Cleanup: minor changes to edit-mesh API calls
Rename:
- EDBM_mesh_free -> EDBM_mesh_free_data
BKE_editmesh_free -> BKE_editmesh_free_data
Since this doesn't free the edit-mesh pointer.
- BKE_editmesh_free_derivedmesh -> BKE_editmesh_free_derived_caches
Since this no longer uses derived-mesh, match naming for the related
object function BKE_object_free_derived_caches.
Also remove `do_tessellate` argument from BKE_editmesh_create,
since the caller can explicitly do this if it's needed,
with the advantage that it can be combined with normal calculation
which is faster on high-poly meshes.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_undo.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_undo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c index 112de68b52c..613c58e87c8 100644 --- a/source/blender/editors/mesh/editmesh_undo.c +++ b/source/blender/editors/mesh/editmesh_undo.c @@ -671,7 +671,7 @@ static void undomesh_to_editmesh(UndoMesh *um, Object *ob, BMEditMesh *em, Key * em->bm->shapenr = um->shapenr; - EDBM_mesh_free(em); + EDBM_mesh_free_data(em); bm = BM_mesh_create(&allocsize, &((struct BMeshCreateParams){ @@ -685,9 +685,11 @@ static void undomesh_to_editmesh(UndoMesh *um, Object *ob, BMEditMesh *em, Key * .active_shapekey = um->shapenr, })); - em_tmp = BKE_editmesh_create(bm, true); + em_tmp = BKE_editmesh_create(bm); *em = *em_tmp; + BKE_editmesh_looptri_calc(em); + em->selectmode = um->selectmode; bm->selectmode = um->selectmode; |