From 08d43e01cbf9d4025cc0b28f04cf0d7eb93ce947 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Sat, 4 Jun 2022 15:45:21 +0200 Subject: Fix changes persisting when exiting edit mode --- source/blender/editors/mesh/editmesh_undo.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/mesh') diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c index d75c92f963f..4bd3ef166f3 100644 --- a/source/blender/editors/mesh/editmesh_undo.c +++ b/source/blender/editors/mesh/editmesh_undo.c @@ -594,6 +594,10 @@ static void *undomesh_from_editmesh(UndoMesh *um, BMEditMesh *em, Key *key, Undo /* Uncomment for troubleshooting. */ // BM_mesh_validate(em->bm); + /* Copy the ID name characters to the mesh so code that depends on accessing the ID type can work + * on it. Necessary to use the attribute API. */ + strcpy(um->me.id.name, "ME"); + BM_mesh_bm_to_me( NULL, em->bm, -- cgit v1.2.3