add 'Control Points' and 'Segments' editmode menus for Surfaces
authorPhilipp Oeser <info@graphics-engineer.com>
Fri, 7 Dec 2018 13:57:54 +0000 (14:57 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Fri, 7 Dec 2018 14:15:52 +0000 (15:15 +0100)
Fixes T58922

Reviewers: brecht, billreynish

Maniphest Tasks: T58922

Differential Revision: https://developer.blender.org/D4046

release/scripts/startup/bl_ui/space_view3d.py

index f406ddb58d586ae7c81e3b7b5f2f0559d7a1ef59..6fef07c8284c0386aa11576da3b5eeaaeb270f29 100644 (file)
@@ -350,7 +350,7 @@ class VIEW3D_MT_editor_menus(Menu):
                 layout.menu("VIEW3D_MT_edit_mesh_edges")
                 layout.menu("VIEW3D_MT_edit_mesh_faces")
                 layout.menu("VIEW3D_MT_uv_map", text="UV")
-            elif mode_string == 'EDIT_CURVE':
+            elif mode_string in ['EDIT_CURVE', 'EDIT_SURFACE']:
                 layout.menu("VIEW3D_MT_edit_curve_ctrlpoints")
                 layout.menu("VIEW3D_MT_edit_curve_segments")
 
@@ -3319,7 +3319,7 @@ class VIEW3D_MT_edit_curve_ctrlpoints(Menu):
 
         edit_object = context.edit_object
 
-        if edit_object.type == 'CURVE':
+        if edit_object.type in ['CURVE', 'SURFACE']:
             layout.operator("curve.extrude_move")
 
             layout.separator()
@@ -3328,20 +3328,22 @@ class VIEW3D_MT_edit_curve_ctrlpoints(Menu):
 
             layout.separator()
 
-            layout.operator("transform.tilt")
-            layout.operator("curve.tilt_clear")
+            if edit_object.type == 'CURVE':
+                layout.operator("transform.tilt")
+                layout.operator("curve.tilt_clear")
 
-            layout.separator()
+                layout.separator()
 
-            layout.operator_menu_enum("curve.handle_type_set", "type")
-            layout.operator("curve.normals_make_consistent")
+                layout.operator_menu_enum("curve.handle_type_set", "type")
+                layout.operator("curve.normals_make_consistent")
 
-            layout.separator()
+                layout.separator()
 
             layout.operator("curve.smooth")
-            layout.operator("curve.smooth_weight")
-            layout.operator("curve.smooth_radius")
-            layout.operator("curve.smooth_tilt")
+            if edit_object.type == 'CURVE':
+                layout.operator("curve.smooth_weight")
+                layout.operator("curve.smooth_radius")
+                layout.operator("curve.smooth_tilt")
 
             layout.separator()