[Bf-blender-cvs] [929a2106085] blender-v3.2-release: Fix T97758: Applying modifiers bakes shape-keys

Campbell Barton noreply at git.blender.org
Fri May 6 05:41:11 CEST 2022


Commit: 929a21060851e75b18a54a8c388b472d77ce4abb
Author: Campbell Barton
Date:   Fri May 6 13:33:21 2022 +1000
Branches: blender-v3.2-release
https://developer.blender.org/rB929a21060851e75b18a54a8c388b472d77ce4abb

Fix T97758: Applying modifiers bakes shape-keys

Regression in [0] which is useful when applying modifiers as a shape-key
but not when applying modifiers which keeps the existing shape-keys.

[0]: 65c5ebf5779d07fb92fabd0ff992337f6c980cde

===================================================================

M	source/blender/editors/object/object_modifier.cc

===================================================================

diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc
index 3328fe65f2e..eed0a63565e 100644
--- a/source/blender/editors/object/object_modifier.cc
+++ b/source/blender/editors/object/object_modifier.cc
@@ -740,7 +740,13 @@ static bool modifier_apply_obdata(
     }
     else {
       Mesh *mesh_applied = modifier_apply_create_mesh_for_modifier(
-          depsgraph, ob, md_eval, true, true);
+          depsgraph,
+          ob,
+          md_eval,
+          /* It's important not to apply virtual modifiers (e.g. shape-keys) because they're kept,
+           * causing them to be applied twice, see: T97758. */
+          false,
+          true);
       if (!mesh_applied) {
         BKE_report(reports, RPT_ERROR, "Modifier returned error, skipping apply");
         return false;



More information about the Bf-blender-cvs mailing list