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:
authorHans Goudey <h.goudey@me.com>2022-06-04 16:45:21 +0300
committerHans Goudey <h.goudey@me.com>2022-06-04 16:45:21 +0300
commit08d43e01cbf9d4025cc0b28f04cf0d7eb93ce947 (patch)
treef9082c19eb661fb6b7dee04421ad20b01702e047 /source/blender/editors/mesh
parentf6b729347017edbf98452c17c1a809728129ed33 (diff)
Fix changes persisting when exiting edit mode
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_undo.c4
1 files changed, 4 insertions, 0 deletions
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,