svn merge ^/trunk/blender -r41226:41227 .
[blender.git] / source / blender / editors / transform / transform_generics.c
index 103556a..8fc1b57 100644 (file)
@@ -70,6 +70,7 @@
 #include "BKE_mesh.h"
 #include "BKE_nla.h"
 #include "BKE_context.h"
+#include "BKE_tessmesh.h"
 
 #include "ED_anim_api.h"
 #include "ED_armature.h"
@@ -230,10 +231,10 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
 }
 
 /* assumes obedit set to mesh object */
-static void editmesh_apply_to_mirror(TransInfo *t)
+static void editbmesh_apply_to_mirror(TransInfo *t)
 {
        TransData *td = t->data;
-       EditVert *eve;
+       BMVert *eve;
        int i;
        
        for(i = 0 ; i < t->total; i++, td++) {
@@ -368,7 +369,6 @@ static void recalcData_actedit(TransInfo *t)
                BLI_freelistN(&anim_data);
        }
 }
-
 /* helper for recalcData() - for Graph Editor transforms */
 static void recalcData_graphedit(TransInfo *t)
 {
@@ -639,6 +639,7 @@ static void recalcData_view3d(TransInfo *t)
                                        calchandlesNurb(nu); /* Cant do testhandlesNurb here, it messes up the h1 and h2 flags */
                                        nu= nu->next;
                                }
+
                        } 
                        else {
                                /* Normal updating */
@@ -661,7 +662,7 @@ static void recalcData_view3d(TransInfo *t)
                        if(la->editlatt->latt->flag & LT_OUTSIDE) outside_lattice(la->editlatt->latt);
                }
                else if (t->obedit->type == OB_MESH) {
-                       EditMesh *em = ((Mesh*)t->obedit->data)->edit_mesh;
+                       BMEditMesh *em = ((Mesh*)t->obedit->data)->edit_btmesh;
                        /* mirror modifier clipping? */
                        if(t->state != TRANS_CANCEL) {
                                /* apply clipping after so we never project past the clip plane [#25423] */
@@ -669,11 +670,12 @@ static void recalcData_view3d(TransInfo *t)
                                clipMirrorModifier(t, t->obedit);
                        }
                        if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR))
-                               editmesh_apply_to_mirror(t);
+                               editbmesh_apply_to_mirror(t);
                                
                        DAG_id_tag_update(t->obedit->data, 0);  /* sets recalc flags */
                        
-                       recalc_editnormals(em);
+                       EDBM_RecalcNormals(em);
+                       BMEdit_RecalcTesselation(em);
                }
                else if(t->obedit->type==OB_ARMATURE) { /* no recalc flag, does pose */
                        bArmature *arm= t->obedit->data;
@@ -1489,13 +1491,13 @@ void calculateCenter(TransInfo *t)
                /* EDIT MODE ACTIVE EDITMODE ELEMENT */
 
                if (t->obedit && t->obedit->type == OB_MESH) {
-                       EditSelection ese;
-                       EditMesh *em = BKE_mesh_get_editmesh(t->obedit->data);
+                       BMEditSelection ese;
+                       BMEditMesh *em = ((Mesh*)t->obedit->data)->edit_btmesh;
                        
-                       if (EM_get_actSelection(em, &ese)) {
-                               EM_editselection_center(t->center, &ese);
-                               calculateCenter2D(t);
-                               break;
+                       if (EDBM_get_actSelection(em, &ese)) {
+                       EDBM_editselection_center(em, t->center, &ese);
+                       calculateCenter2D(t);
+                       break;
                        }
                } /* END EDIT MODE ACTIVE ELEMENT */