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:
authorCampbell Barton <campbell@blender.org>2022-03-07 13:31:48 +0300
committerCampbell Barton <campbell@blender.org>2022-03-07 13:31:48 +0300
commit72e20785e1e2ed7b15a9765ebb6df646fd32dbff (patch)
treed1d92469a0c3472c31a1931fcb79f573adcf59fe /source/blender/editors
parent073d2390f0b8d37a5f02309ac1dcaf7618d7a4f9 (diff)
Fix T96205: Active shape key gets lost upon edit mode undo
Regression in d961adb866cc2d7a95e4c6a7f06c49e346ec1abe, it's important that for the Mesh used for undo storage matches the shape-key instead of using the coordinates of the Basis key. Prior to bfdbc78466ac14d45f353db9aa39cb21bb962701 a different method of restoring the basis shape-key coordinates was used (restoring from the input `Mesh.mvert` array). When undo wrote the edit-mesh into the mesh this was always NULL so the basis shape keys coordinates were never used. Now a parameter has been added so undo can use the active shape for the meshes vertex coordinates. Reviewed By: sergey Maniphest Tasks: T96205 Ref D14258
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/mesh/editmesh_undo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c
index 2960070714c..3452edd51dd 100644
--- a/source/blender/editors/mesh/editmesh_undo.c
+++ b/source/blender/editors/mesh/editmesh_undo.c
@@ -615,6 +615,7 @@ static void *undomesh_from_editmesh(UndoMesh *um, BMEditMesh *em, Key *key, Undo
.calc_object_remap = false,
.update_shapekey_indices = false,
.cd_mask_extra = {.vmask = CD_MASK_SHAPE_KEYINDEX},
+ .active_shapekey_to_mvert = true,
}));
um->selectmode = em->selectmode;