diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-28 16:42:00 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-29 13:48:12 +0300 |
commit | 3eff6f7a5ed5f04745b372625d0dc58f0a52be9a (patch) | |
tree | a5b88f767b14f7061ee586b12dba5fc814838ef3 /source/blender/editors | |
parent | 04f8929271148659f3157fd728f7437e6409a29f (diff) |
Cleanup: some moar DM kicking, in armature edit code.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/armature/armature_skinning.c | 17 | ||||
-rw-r--r-- | source/blender/editors/armature/meshlaplacian.c | 5 |
2 files changed, 10 insertions, 12 deletions
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c index 87a66514417..63068e61ba3 100644 --- a/source/blender/editors/armature/armature_skinning.c +++ b/source/blender/editors/armature/armature_skinning.c @@ -45,11 +45,12 @@ #include "BKE_armature.h" #include "BKE_context.h" #include "BKE_deform.h" +#include "BKE_mesh_iterators.h" #include "BKE_mesh_runtime.h" +#include "BKE_modifier.h" #include "BKE_object_deform.h" #include "BKE_report.h" #include "BKE_subsurf.h" -#include "BKE_modifier.h" #include "DEG_depsgraph.h" @@ -259,7 +260,7 @@ static void add_verts_to_dgroups( * into account and vertex weights can be mirrored. * * The mesh vertex positions used are either the final deformed coords - * from the derivedmesh in weightpaint mode, the final subsurf coords + * from the evaluated mesh in weightpaint mode, the final subsurf coords * when parenting, or simply the original mesh coords. */ @@ -373,15 +374,11 @@ static void add_verts_to_dgroups( verts = MEM_callocN(mesh->totvert * sizeof(*verts), "closestboneverts"); if (wpmode) { - /* if in weight paint mode, use final verts from derivedmesh */ - DerivedMesh *dm = mesh_get_derived_final(depsgraph, scene, ob, CD_MASK_BAREMESH); + /* if in weight paint mode, use final verts from evaluated mesh */ + Mesh *me_eval = mesh_get_eval_final(depsgraph, scene, ob, CD_MASK_BAREMESH); - if (dm->foreachMappedVert) { - mesh_get_mapped_verts_coords(dm, verts, mesh->totvert); - vertsfilled = 1; - } - - dm->release(dm); + BKE_mesh_foreach_mapped_vert_coords_get(me_eval, verts, mesh->totvert); + vertsfilled = 1; } else if (modifiers_findByType(ob, eModifierType_Subsurf)) { /* is subsurf on? Lets use the verts on the limit surface then. diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 1f01def5133..001c8ce215f 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -29,6 +29,7 @@ #include "DNA_object_types.h" #include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" #include "DNA_scene_types.h" #include "BLI_math.h" @@ -39,10 +40,10 @@ #include "BLT_translation.h" -#include "BKE_DerivedMesh.h" -#include "BKE_modifier.h" +#include "BKE_bvhutils.h" #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" +#include "BKE_modifier.h" #include "ED_mesh.h" #include "ED_armature.h" |