Merge branch 'blender2.8' into soc-2018-bevel
[blender.git] / source / blender / editors / screen / screen_ops.c
index f6bd238170d3e6cdf9b5a64575715326b5eb90e2..1ecc3f723553b92696e0809d989e9276dd6712e0 100644 (file)
@@ -47,6 +47,7 @@
 #include "DNA_gpencil_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_meta_types.h"
+#include "DNA_mesh_types.h"
 #include "DNA_mask_types.h"
 #include "DNA_node_types.h"
 #include "DNA_workspace_types.h"
@@ -359,6 +360,15 @@ int ED_operator_editmesh_region_view3d(bContext *C)
        return 0;
 }
 
+int ED_operator_editmesh_auto_smooth(bContext *C)
+{
+       Object *obedit = CTX_data_edit_object(C);
+       if (obedit && obedit->type == OB_MESH && (((Mesh *)(obedit->data))->flag & ME_AUTOSMOOTH)) {
+               return NULL != BKE_editmesh_from_object(obedit);
+       }
+       return 0;
+}
+
 int ED_operator_editarmature(bContext *C)
 {
        Object *obedit = CTX_data_edit_object(C);