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:
authorPhilipp Oeser <info@graphics-engineer.com>2022-08-23 10:51:36 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-09-19 15:45:44 +0300
commitfd248e6bf9947f4a1d9da07ebf788fbcf2018293 (patch)
treece104d27679d1144e078555fa0e3281bcee18e47
parent52a5c80313c206eb7c1b31af3079bffdda4b09c6 (diff)
Fix T100578: Surface Deform modifier displays wrong in editmode
This was the case when the "Show in Editmode" option was used and a vertexgroup affected the areas. Probably an oversight in {rBdeaff945d0b9}?, seems like deforming modifiers always need to call `BKE_mesh_wrapper_ensure_mdata` in `deformVertsEM` when a vertex group is used. Maniphest Tasks: T100578 Differential Revision: https://developer.blender.org/D15756
-rw-r--r--source/blender/modifiers/intern/MOD_surfacedeform.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index 99011c5e351..44fa974b3ee 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -1511,6 +1511,11 @@ static void deformVertsEM(ModifierData *md,
mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, NULL, numVerts, false, false);
}
+ /* TODO(@campbellbarton): use edit-mode data only (remove this line). */
+ if (mesh_src != NULL) {
+ BKE_mesh_wrapper_ensure_mdata(mesh_src);
+ }
+
surfacedeformModifier_do(md, ctx, vertexCos, numVerts, ctx->object, mesh_src);
if (!ELEM(mesh_src, NULL, mesh)) {