merge with trunk at r31523
[blender.git] / source / blender / modifiers / intern / MOD_meshdeform.c
index fa1ee7e31595eee444c16bc24ab6b9503b4ef04c..b89db2fdc2d9bd37edc2a8d05e190fb91f6b2353 100644 (file)
@@ -30,6 +30,7 @@
 *
 */
 
+#include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_object_types.h"
 
@@ -40,6 +41,7 @@
 #include "BKE_mesh.h"
 #include "BKE_modifier.h"
 #include "BKE_deform.h"
+#include "BKE_tessmesh.h"
 
 #include "depsgraph_private.h"
 
@@ -177,7 +179,7 @@ static void meshdeformModifier_do(
 {
        MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
        struct Mesh *me= (mmd->object)? mmd->object->data: NULL;
-       struct EditMesh *em = (me)? BKE_mesh_get_editmesh(me): NULL;
+       BMEditMesh *em = me ? me->edit_btmesh : NULL;
        DerivedMesh *tmpdm, *cagedm;
        MDeformVert *dvert = NULL;
        MDeformWeight *dw;
@@ -193,10 +195,9 @@ static void meshdeformModifier_do(
        
        /* get cage derivedmesh */
        if(em) {
-               tmpdm= editmesh_get_derived_cage_and_final(md->scene, ob, em, &cagedm, 0);
+               tmpdm= editbmesh_get_derived_cage_and_final(md->scene, ob, em, &cagedm, 0);
                if(tmpdm)
                        tmpdm->release(tmpdm);
-               BKE_mesh_end_editmesh(me, em);
        }
        else
                cagedm= mmd->object->derivedFinal;
@@ -352,8 +353,7 @@ static void deformVerts(
                dm->release(dm);
 }
 
-static void deformVertsEM(
-                                                ModifierData *md, Object *ob, struct EditMesh *editData,
+static void deformVertsEM(ModifierData *md, Object *ob, struct BMEditMesh *editData,
          DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
 {
        DerivedMesh *dm= get_dm(md->scene, ob, NULL, derivedData, NULL, 0);;