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-02-22 01:57:07 +0300
committerCampbell Barton <campbell@blender.org>2022-02-22 01:57:07 +0300
commitbfdbc78466ac14d45f353db9aa39cb21bb962701 (patch)
treeda42e8c9584c6207b04a3d1e1c8cb9295be5a5b2 /CMakeLists.txt
parentc3d36b71273ad330ad59f0f8a09a5c789bd52a48 (diff)
Fix T44415: Shape keys get out of sync when using undo in edit-mode
This is an alternate fix for T35170 since it caused T44415. Having the undo system manipulate the key-block coordinates is error prone as (in the case of T44415) there are situations when it's important to apply the difference with the original shape key. This reverts dab0bd9de65a9be5e8ababba0e2799f994d5d12f, and instead avoids the problem by not using the data in `Mesh.key` as a reference for updating shape-keys when exiting edit-mode. The assumption that the `Mesh.key` in edit-mode won't be modified until leaving edit-mode isn't always true. Leading to synchronization errors. (details noted in code-comments). Resolve this by using shape-key data stored in the BMesh. Resolving both T35170 & T44415. Details: - Remove use of the original vertices when exiting edit mode. - Remove use of the original shape-key coordinates when exiting edit-mode (except as a last resort). - Move shape-key synchronization into a separate function: `bm_to_mesh_key`. - Split the synchronization loop into two branches, depending on the existence of BMesh shape-key coordinates. - Always write shape-key values back to the BMesh CD_SHAPEKEY layers. This was only done in some cases but is now necessary for all shape-keys as these are used to calculate offsets where the `Mesh.key` was previously used. - Report a warning when the shape-key layer isn't found as this uses an imperfect method of restoring coordinates which should only be used as a last resort. Reviewed By: mont29 Ref D14127
Diffstat (limited to 'CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions