diff options
Diffstat (limited to 'source/blender/editors/armature/armature_skinning.c')
-rw-r--r-- | source/blender/editors/armature/armature_skinning.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c index 3a1e7419d3c..2cd4b53f7f4 100644 --- a/source/blender/editors/armature/armature_skinning.c +++ b/source/blender/editors/armature/armature_skinning.c @@ -21,6 +21,7 @@ #include "BKE_action.h" #include "BKE_armature.h" #include "BKE_deform.h" +#include "BKE_mesh.h" #include "BKE_mesh_iterators.h" #include "BKE_mesh_runtime.h" #include "BKE_modifier.h" @@ -203,9 +204,9 @@ static void envelope_bone_weighting(Object *ob, } /* for each vertex in the mesh */ + const MVert *mesh_verts = BKE_mesh_vertices(mesh); for (int i = 0; i < mesh->totvert; i++) { - - if (use_mask && !(mesh->mvert[i].flag & SELECT)) { + if (use_mask && !(mesh_verts[i].flag & SELECT)) { continue; } @@ -405,9 +406,10 @@ static void add_verts_to_dgroups(ReportList *reports, } /* transform verts to global space */ + const MVert *mesh_verts = BKE_mesh_vertices(mesh); for (int i = 0; i < mesh->totvert; i++) { if (!vertsfilled) { - copy_v3_v3(verts[i], mesh->mvert[i].co); + copy_v3_v3(verts[i], mesh_verts[i].co); } mul_m4_v3(ob->obmat, verts[i]); } |