From e0772c6607ae6cd48193101b39d7332cb76ab2c9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 26 Aug 2020 23:20:37 +1000 Subject: Fix T80098: Mesh deform doesn't update in edit mode Use BKE_mesh_wrapper API access to access mesh coordinates for modifier evaluation. Call BKE_mesh_wrapper_ensure_mdata when binding since it's a one off operation. Regression from deaff945d0b96. Reviewed by: @brecht Ref D8709 --- source/blender/editors/armature/meshlaplacian.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 11066595e2e..195d3ebc6c7 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -37,6 +37,7 @@ #include "BKE_bvhutils.h" #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" +#include "BKE_mesh_wrapper.h" #include "BKE_modifier.h" #include "ED_armature.h" @@ -1761,6 +1762,9 @@ void ED_mesh_deform_bind_callback(MeshDeformModifierData *mmd, memset(&mdb, 0, sizeof(MeshDeformBind)); + /* No need to support other kinds of mesh data as binding is a one-off action. */ + BKE_mesh_wrapper_ensure_mdata(cagemesh); + /* get mesh and cage mesh */ mdb.vertexcos = MEM_callocN(sizeof(float) * 3 * totvert, "MeshDeformCos"); mdb.totvert = totvert; -- cgit v1.2.3