Fix T67098: Inset causes shape keys to reset exiting edit-mode

Edit-mesh interactive redo reset the meshes shape-key index.

Also copy the selection mode when copying meshes.
This commit is contained in:
Campbell Barton 2020-04-08 16:24:33 +10:00
parent bd45ec0b06
commit 35861a49ee
Notes: blender-bot 2023-02-14 09:43:37 +01:00
Referenced by issue #67098, Extrusion reverts if shape key is present.
2 changed files with 8 additions and 0 deletions

View File

@ -67,6 +67,10 @@ BMEditMesh *BKE_editmesh_copy(BMEditMesh *em)
* tessellation only when/if that copy ends up getting used. */
em_copy->looptris = NULL;
/* Copy various settings. */
em_copy->selectmode = em->selectmode;
em_copy->mat_nr = em->mat_nr;
return em_copy;
}

View File

@ -717,6 +717,10 @@ BMesh *BM_mesh_copy(BMesh *bm_old)
MEM_freeN(vtable);
MEM_freeN(ftable);
/* Copy various settings. */
bm_new->shapenr = bm_old->shapenr;
bm_new->selectmode = bm_old->selectmode;
return bm_new;
}