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:
authorBastien Montagne <bastien@blender.org>2020-10-08 17:24:38 +0300
committerBastien Montagne <bastien@blender.org>2020-10-08 17:25:34 +0300
commit5f364216acd5bf0f8098b1da1cdb2e75d42d59b3 (patch)
tree11f8e8da30f7714b3d895c67787f3e68122208e7 /source/blender/editors/mesh/editmesh_undo.c
parentd7f482f88ecba7cf8f864f3bd092506c88c78f25 (diff)
Cleanup/Refactor: Shapekey: Get rid of `BKE_key_copy_nolib()`
Once again, no behavioral change expected here.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_undo.c')
-rw-r--r--source/blender/editors/mesh/editmesh_undo.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c
index 9f625fd0515..41d840c4a2d 100644
--- a/source/blender/editors/mesh/editmesh_undo.c
+++ b/source/blender/editors/mesh/editmesh_undo.c
@@ -35,6 +35,7 @@
#include "BKE_editmesh.h"
#include "BKE_key.h"
#include "BKE_layer.h"
+#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_undo_system.h"
@@ -508,7 +509,13 @@ static void *undomesh_from_editmesh(UndoMesh *um, BMEditMesh *em, Key *key)
}
#endif
/* make sure shape keys work */
- um->me.key = key ? BKE_key_copy_nolib(key) : NULL;
+ if (key != NULL) {
+ um->me.key = (Key *)BKE_id_copy_ex(
+ NULL, &key->id, NULL, LIB_ID_COPY_LOCALIZE | LIB_ID_COPY_NO_ANIMDATA);
+ }
+ else {
+ um->me.key = NULL;
+ }
/* BM_mesh_validate(em->bm); */ /* for troubleshooting */