diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-07 13:31:48 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-07 13:31:48 +0300 |
commit | 72e20785e1e2ed7b15a9765ebb6df646fd32dbff (patch) | |
tree | d1d92469a0c3472c31a1931fcb79f573adcf59fe /source/blender/bmesh/intern/bmesh_mesh_convert.h | |
parent | 073d2390f0b8d37a5f02309ac1dcaf7618d7a4f9 (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/bmesh/intern/bmesh_mesh_convert.h')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh_convert.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.h b/source/blender/bmesh/intern/bmesh_mesh_convert.h index 07ffc8b43df..6da5412a81c 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_convert.h +++ b/source/blender/bmesh/intern/bmesh_mesh_convert.h @@ -69,6 +69,11 @@ struct BMeshToMeshParams { * that have become invalid from updating the shape-key, see T71865. */ uint update_shapekey_indices : 1; + /** + * Instead of copying the basis shape-key into the #MVert array, + * copy the #BMVert.co directly to #MVert.co (used for reading undo data). + */ + uint active_shapekey_to_mvert : 1; struct CustomData_MeshMasks cd_mask_extra; }; /** |