merge with/from trunk at r35190
[blender.git] / source / blender / blenkernel / intern / shrinkwrap.c
index 53fefa685b9b6bdd3d0ae84eca58dcadd3f01d40..5311f3a9c384f2f3c1a36aa812143dbce98e5b77 100644 (file)
@@ -39,6 +39,7 @@
 #include "DNA_meshdata_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_scene_types.h"
+#include "DNA_windowmanager_types.h"
 
 #include "BLI_editVert.h"
 #include "BLI_math.h"
@@ -51,6 +52,8 @@
 #include "BKE_deform.h"
 #include "BKE_mesh.h"
 #include "BKE_subsurf.h"
+#include "BKE_mesh.h"
+#include "BKE_tessmesh.h"
 
 /* Util macros */
 #define OUT_OF_MEMORY()        ((void)printf("Shrinkwrap: Out of memory\n"))
@@ -86,11 +89,11 @@ typedef void ( *Shrinkwrap_ForeachVertexCallback) (DerivedMesh *target, float *c
 DerivedMesh *object_get_derived_final(Object *ob)
 {
        Mesh *me= ob->data;
-       EditMesh *em = BKE_mesh_get_editmesh(me);
+       BMEditMesh *em = me->edit_btmesh;
 
-       if(em) {
+       if (em)
+       {
                DerivedMesh *dm = em->derivedFinal;
-               BKE_mesh_end_editmesh(me, em);
                return dm;
        }