svn merge ^/trunk/blender -r41226:41227 .
[blender.git] / source / blender / editors / screen / screen_ops.c
index 0a7e3a2..4fd6af0 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;
 }
 
@@ -360,24 +361,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;
 }
 
@@ -2952,7 +2950,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;