svn merge ^/trunk/blender -r43392:43420
[blender.git] / source / blender / editors / screen / screen_ops.c
index 30cb9e8e53f220ebc3dd36fe7e34c8d4baad7c49..a3874c9f28abe7f4cd61dc5719b91eb8bd095dea 100644 (file)
@@ -54,6 +54,7 @@
 #include "BKE_report.h"
 #include "BKE_scene.h"
 #include "BKE_screen.h"
+#include "BKE_tessmesh.h"
 #include "BKE_sound.h"
 
 #include "WM_api.h"
@@ -313,7 +314,7 @@ int ED_operator_editmesh(bContext *C)
 {
        Object *obedit= CTX_data_edit_object(C);
        if(obedit && obedit->type==OB_MESH)
-               return NULL != ((Mesh *)obedit->data)->edit_mesh;
+               return NULL != ((Mesh *)obedit->data)->edit_btmesh;
        return 0;
 }
 
@@ -366,18 +367,15 @@ int ED_operator_uvedit(bContext *C)
 int ED_operator_uvmap(bContext *C)
 {
        Object *obedit= CTX_data_edit_object(C);
-       EditMesh *em= NULL;
+       BMEditMesh *em= NULL;
        
        if(obedit && obedit->type==OB_MESH)
-               em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
+               em= ((Mesh *)obedit->data)->edit_btmesh;
        
-       if(em && (em->faces.first)) {
-               BKE_mesh_end_editmesh(obedit->data, em);
+       if(em && (em->bm->totface)) {
                return 1;
        }
        
-       if(obedit)
-               BKE_mesh_end_editmesh(obedit->data, em);
        return 0;
 }