Merge branch 'blender2.8' into soc-2018-bevel
[blender.git] / source / blender / editors / screen / screen_ops.c
index a837b32b0bb00fea598730e05e04dce79839d1cb..e2d6a9aa6ca0d604cee07bf40181099b516dd778 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 @@ bool ED_operator_editmesh_region_view3d(bContext *C)
        return 0;
 }
 
+bool 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;
+}
+
 bool ED_operator_editarmature(bContext *C)
 {
        Object *obedit = CTX_data_edit_object(C);