UI: Show shade smooth/flat in curve context menu
authorCampbell Barton <ideasman42@gmail.com>
Wed, 2 Jan 2019 08:03:32 +0000 (19:03 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 2 Jan 2019 08:03:32 +0000 (19:03 +1100)
release/scripts/startup/bl_ui/space_view3d.py

index 3fe3612e9fd61192a3727741475da4fa4032471d..47863156898d89f35a30a652f81c74208a7b84c3 100644 (file)
@@ -1751,15 +1751,15 @@ class VIEW3D_MT_object_specials(Menu):
         '''
 
         # If something is selected
-        if obj is None:
-            pass
-        elif obj.type == 'MESH':
-
+        if obj is not None and obj.type in {'MESH', 'CURVE', 'SURFACE'}:
             layout.operator("object.shade_smooth", text="Shade Smooth")
             layout.operator("object.shade_flat", text="Shade Flat")
 
             layout.separator()
 
+        if obj is None:
+            pass
+        elif obj.type == 'MESH':
             layout.operator_context = 'INVOKE_REGION_WIN'
             layout.operator_menu_enum("object.origin_set", text="Set Origin...", property="type")