diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-15 06:29:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-15 06:29:46 +0300 |
commit | f9f67e0239c7fe696872e9c06300b296799faa42 (patch) | |
tree | 3702c6a6cfbaabfdce8fb9eeb16fc0e107f2b632 | |
parent | 881334c499c839679b4b40e0ce1ca6bda3c03a39 (diff) |
Mesh: remove DerivedMesh from various places
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_iterators.c | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 2b5b5a078a6..053d6226d93 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -1730,7 +1730,7 @@ static void skin_armature_bone_create(Object *skin_ob, static Object *modifier_skin_armature_create(Depsgraph *depsgraph, Main *bmain, Scene *scene, Object *skin_ob) { BLI_bitmap *edges_visited; - DerivedMesh *deform_dm; + Mesh *me_eval_deform; MVert *mvert; Mesh *me = skin_ob->data; Object *arm_ob; @@ -1740,8 +1740,8 @@ static Object *modifier_skin_armature_create(Depsgraph *depsgraph, Main *bmain, int *emap_mem; int v; - deform_dm = mesh_get_derived_deform(depsgraph, scene, skin_ob, CD_MASK_BAREMESH); - mvert = deform_dm->getVertArray(deform_dm); + me_eval_deform = mesh_get_eval_deform(depsgraph, scene, skin_ob, CD_MASK_BAREMESH); + mvert = me_eval_deform->mvert; /* add vertex weights to original mesh */ CustomData_add_layer(&me->vdata, diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c index 1a3b0bf64cd..3d0b0a7a348 100644 --- a/source/blender/editors/space_view3d/view3d_iterators.c +++ b/source/blender/editors/space_view3d/view3d_iterators.c @@ -28,6 +28,7 @@ #include "DNA_lattice_types.h" #include "DNA_meta_types.h" #include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" #include "DNA_armature_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" @@ -116,9 +117,9 @@ void meshobject_foreachScreenVert( void *userData, eV3DProjTest clip_flag) { foreachScreenObjectVert_userData data; - DerivedMesh *dm; + Mesh *me; - dm = mesh_get_derived_deform(vc->depsgraph, vc->scene, vc->obact, CD_MASK_BAREMESH); + me = mesh_get_eval_deform(vc->depsgraph, vc->scene, vc->obact, CD_MASK_BAREMESH); ED_view3d_check_mats_rv3d(vc->rv3d); @@ -131,9 +132,7 @@ void meshobject_foreachScreenVert( ED_view3d_clipping_local(vc->rv3d, vc->obact->obmat); } - dm->foreachMappedVert(dm, meshobject_foreachScreenVert__mapFunc, &data, DM_FOREACH_NOP); - - dm->release(dm); + BKE_mesh_foreach_mapped_vert(me, meshobject_foreachScreenVert__mapFunc, &data, MESH_FOREACH_NOP); } static void mesh_foreachScreenVert__mapFunc(void *userData, int index, const float co[3], |