Commit: 08ec9b71df3582d0797778baf2ff185c6ea9d3ab
Author: Campbell Barton
Date: Wed Aug 26 23:28:44 2020 +1000
Branches: master
https://developer.blender.org/rB08ec9b71df3582d0797778baf2ff185c6ea9d3ab
Merge branch 'blender-v2.90-release' into master
===================================================================
===================================================================
diff --cc source/blender/editors/armature/meshlaplacian.c
index 75ffd31854a,195d3ebc6c7..ceacd3333d5
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@@ -1761,8 -1762,11 +1762,11 @@@ void ED_mesh_deform_bind_callback(MeshD
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.vertexcos = MEM_callocN(sizeof(float[3]) * totvert, "MeshDeformCos");
mdb.totvert = totvert;
mdb.cagemesh = cagemesh;
diff --cc source/blender/modifiers/intern/MOD_meshdeform.c
index 79d666d9e2a,5ef6d5b6485..4dee70608f8
--- a/source/blender/modifiers/intern/MOD_meshdeform.c
+++ b/source/blender/modifiers/intern/MOD_meshdeform.c
@@@ -425,13 -426,19 +420,17 @@@ static void meshdeformModifier_do(Modif
*/
dco = MEM_calloc_arrayN((totcagevert + 1), sizeof(*dco), "MDefDco");
zero_v3(dco[totcagevert]);
+
+ /* setup deformation data */
+ BKE_mesh_wrapper_vert_coords_copy(cagemesh, dco, totcagevert);
+ bindcagecos = (float(*)[3])mmd->bindcagecos;
+
- if (G.debug_value != 527) {
- for (a = 0; a < totcagevert; a++) {
- /* get cage vertex in world space with binding transform */
- float co[3];
- mul_v3_m4v3(co, mmd->bindmat, dco[a]);
- /* compute difference with world space bind coord */
- sub_v3_v3v3(dco[a], co, bindcagecos[a]);
- }
+ for (a = 0; a < totcagevert; a++) {
+ /* get cage vertex in world space with binding transform */
- copy_v3_v3(co, cagecos[a]);
-
- mul_m4_v3(mmd->bindmat, co);
++ float co[3];
++ mul_v3_m4v3(co, mmd->bindmat, dco[a]);
+ /* compute difference with world space bind coord */
+ sub_v3_v3v3(dco[a], co, bindcagecos[a]);
}
MOD_get_vgroup(ob, mesh, mmd->defgrp_name, &dvert, &defgrp_index);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs