diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2022-08-23 10:51:36 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2022-08-23 12:07:26 +0300 |
commit | d269ad3535950becd6904b30c44ad870485dcffe (patch) | |
tree | f86286d19b27fc870f3c3544dad2fef2f82a6e8e /source/blender | |
parent | c76d7f7bde351b030863cbb999ad9e6cefd35fbe (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
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/modifiers/intern/MOD_surfacedeform.c | 5 |
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 ad19ecf5720..5ed9c698390 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -1603,6 +1603,11 @@ static void deformVertsEM(ModifierData *md, mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, NULL, verts_num, 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, verts_num, ctx->object, mesh_src); if (!ELEM(mesh_src, NULL, mesh)) { |