svn merge ^/trunk/blender -r43751:43819, need to look into changes made to editmesh_l...
[blender-staging.git] / source / blender / blenkernel / intern / constraint.c
index 596677435205518851e60bcc5ccad813e224befa..efeacabdba9be320fcef934be0135a4231b5f6a3 100644 (file)
 #include "BKE_global.h"
 #include "BKE_library.h"
 #include "BKE_idprop.h"
+#include "BKE_mesh.h"
 #include "BKE_shrinkwrap.h"
 #include "BKE_mesh.h"
+#include "BKE_tessmesh.h"
+#include "BKE_tracking.h"
+#include "BKE_movieclip.h"
 #include "BKE_tracking.h"
 #include "BKE_movieclip.h"
 
@@ -440,7 +444,7 @@ static void contarget_get_mesh_mat (Object *ob, const char *substring, float mat
 {
        DerivedMesh *dm = NULL;
        Mesh *me= ob->data;
-       EditMesh *em = BKE_mesh_get_editmesh(me);
+       BMEditMesh *em = me->edit_btmesh;
        float vec[3] = {0.0f, 0.0f, 0.0f};
        float normal[3] = {0.0f, 0.0f, 0.0f}, plane[3];
        float imat[3][3], tmat[3][3];
@@ -456,7 +460,7 @@ static void contarget_get_mesh_mat (Object *ob, const char *substring, float mat
        /* get DerivedMesh */
        if (em) {
                /* target is in editmode, so get a special derived mesh */
-               dm = CDDM_from_editmesh(em, ob->data);
+               dm = CDDM_from_BMEditMesh(em, ob->data, FALSE, FALSE);
                freeDM= 1;
        }
        else {
@@ -530,8 +534,6 @@ static void contarget_get_mesh_mat (Object *ob, const char *substring, float mat
        /* free temporary DerivedMesh created (in EditMode case) */
        if (dm && freeDM)
                dm->release(dm);
-       if (em)
-               BKE_mesh_end_editmesh(me, em);
 }
 
 /* function that sets the given matrix based on given vertex group in lattice */