svn merge -r40166:40279 ^/trunk/blender
[blender.git] / source / blender / editors / screen / screen_ops.c
index 5cc42e2..1e79ae8 100644 (file)
@@ -56,6 +56,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"
@@ -315,7 +316,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;
 }
 
@@ -362,24 +363,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;
 }
 
@@ -2954,7 +2952,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;