svn merge -r40051:40075 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / editors / screen / screen_ops.c
index 62fdfc140dfe8500006aba88efbbaa2ee8f08738..48f7f049b23279d559aeaa38e14be6787ebd1412 100644 (file)
@@ -55,6 +55,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"
@@ -314,7 +315,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;
 }
 
@@ -361,24 +362,21 @@ int ED_operator_uvedit(bContext *C)
 {
        SpaceImage *sima= CTX_wm_space_image(C);
        Object *obedit= CTX_data_edit_object(C);
+
        return ED_space_image_show_uvedit(sima, obedit);
 }
 
 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;
 }
 
@@ -2953,7 +2951,7 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
                        ScreenAnimData *sad= wt->customdata;
                        
                        sad->ar= CTX_wm_region(C);
-               }
+                       }
        }
 
        return OPERATOR_FINISHED;