diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_lattice.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_lattice.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c index a6eaf7e78aa..574ea969be4 100644 --- a/source/blender/modifiers/intern/MOD_lattice.c +++ b/source/blender/modifiers/intern/MOD_lattice.c @@ -130,23 +130,16 @@ static void deformVerts(ModifierData *md, static void deformVertsEM(ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *em, - struct Mesh *mesh, + struct Mesh *UNUSED(mesh), float (*vertexCos)[3], int numVerts) { - struct Mesh *mesh_src = MOD_deform_mesh_eval_get( - ctx->object, em, mesh, NULL, numVerts, false, false); - - /* TODO(Campbell): use edit-mode data only (remove this line). */ - if (mesh_src != NULL) { - BKE_mesh_wrapper_ensure_mdata(mesh_src); - } + LatticeModifierData *lmd = (LatticeModifierData *)md; - deformVerts(md, ctx, mesh_src, vertexCos, numVerts); + MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */ - if (!ELEM(mesh_src, NULL, mesh)) { - BKE_id_free(NULL, mesh_src); - } + BKE_lattice_deform_coords_with_editmesh( + lmd->object, ctx->object, vertexCos, numVerts, lmd->flag, lmd->name, lmd->strength, em); } static void panel_draw(const bContext *C, Panel *panel) |