[Bf-blender-cvs] [ad9278fdadd] blender2.8: UI: re-arrange 3D view menus

Campbell Barton noreply at git.blender.org
Thu May 24 16:00:29 CEST 2018


Commit: ad9278fdadd1df271175a7c22f6ca519bcd59231
Author: Campbell Barton
Date:   Thu May 24 15:37:52 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBad9278fdadd1df271175a7c22f6ca519bcd59231

UI: re-arrange 3D view menus

- Adjusted order and names for better consistency.
- Group add/edit/delete into menu sections.
- Move UV/Vertex color into 'Face Data' menu, matching 'Edge Data'.
- De-duplicate items between vertex/edge/face menu.
- Remove undo/redo menu (to be moved into 'Edit' menu).
- Remove Auto-Merge & Proportional Editing
  (already available from the 3D view).

Patch from @billreynish w/ edits

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 324a4259e38..30f924de65a 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -201,8 +201,6 @@ class VIEW3D_MT_transform_base(Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.separator()
-
         layout.operator("transform.tosphere", text="To Sphere")
         layout.operator("transform.shear", text="Shear")
         layout.operator("transform.bend", text="Bend")
@@ -384,6 +382,11 @@ class VIEW3D_MT_uv_map(Menu):
 
         layout.operator("uv.reset")
 
+        layout.separator()
+
+        layout.operator("mesh.uvs_rotate")
+        layout.operator("mesh.uvs_reverse")
+
 
 class VIEW3D_MT_edit_proportional(Menu):
     bl_label = "Proportional Editing"
@@ -409,17 +412,17 @@ class VIEW3D_MT_view(Menu):
         layout = self.layout
         view = context.space_data
 
-        layout.operator("view3d.properties", icon='MENU_PANEL')
-        layout.operator("view3d.toolshelf", icon='MENU_PANEL')
+        layout.operator("view3d.toolshelf", icon='MENU_PANEL', text="Show Toolbar")
+        layout.operator("view3d.properties", icon='MENU_PANEL', text="Show Sidebar")
 
         layout.separator()
 
-        layout.operator("view3d.view_selected").use_all_regions = False
+        layout.operator("view3d.view_selected", text="Frame Selected").use_all_regions = False
         if view.region_quadviews:
-            layout.operator("view3d.view_selected", text="View Selected (Quad View)").use_all_regions = True
+            layout.operator("view3d.view_selected", text="Frame Selected (Quad View)").use_all_regions = True
 
-        layout.operator("view3d.view_all").center = False
-        layout.operator("view3d.view_persportho")
+        layout.operator("view3d.view_all", text="Frame All").center = False
+        layout.operator("view3d.view_persportho", text="Perspective/Orthographic")
 
         layout.separator()
 
@@ -437,16 +440,12 @@ class VIEW3D_MT_view(Menu):
 
         layout.separator()
 
-        layout.operator("view3d.layers", text="Show All Layers").nr = 0
-
-        layout.separator()
-
-        layout.operator("screen.animation_play", text="Playback Animation")
+        layout.operator("screen.animation_play", text="Play Animation")
 
         layout.separator()
 
         layout.operator("render.opengl", icon='RENDER_STILL')
-        layout.operator("render.opengl", text="OpenGL Render (Animation)", icon='RENDER_ANIMATION').animation = True
+        layout.operator("render.opengl", text="OpenGL Render Animation", icon='RENDER_ANIMATION').animation = True
 
         layout.separator()
 
@@ -634,12 +633,12 @@ class VIEW3D_MT_select_object(Menu):
 
         layout.separator()
 
-        layout.operator("object.select_all").action = 'TOGGLE'
-        layout.operator("object.select_all", text="Inverse").action = 'INVERT'
-        layout.operator("object.select_random", text="Random")
-        layout.operator("object.select_mirror", text="Mirror")
+        layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE'
         layout.operator_menu_enum("object.select_by_type", "type", text="Select All by Type...")
-        layout.operator("object.select_camera", text="Select Camera")
+        layout.operator("object.select_camera", text="Select Active Camera")
+        layout.operator("object.select_all", text="Inverse Selection").action = 'INVERT'
+        layout.operator("object.select_mirror", text="Mirror Selection")
+        layout.operator("object.select_random", text="Select Random")
 
         layout.separator()
 
@@ -647,8 +646,8 @@ class VIEW3D_MT_select_object(Menu):
 
         layout.separator()
 
-        layout.operator_menu_enum("object.select_grouped", "type", text="Grouped")
-        layout.operator_menu_enum("object.select_linked", "type", text="Linked")
+        layout.operator_menu_enum("object.select_grouped", "type", text="Select Grouped")
+        layout.operator_menu_enum("object.select_linked", "type", text="Select Linked")
         layout.operator("object.select_pattern", text="Select Pattern...")
 
 
@@ -821,19 +820,19 @@ class VIEW3D_MT_select_edit_mesh(Menu):
         layout.separator()
 
         # primitive
-        layout.operator("mesh.select_all").action = 'TOGGLE'
-        layout.operator("mesh.select_all", text="Inverse").action = 'INVERT'
+        layout.operator("mesh.select_all", text="Select/Deselect All").action = 'TOGGLE'
+        layout.operator("mesh.select_all", text="Inverse Selection").action = 'INVERT'
 
         layout.separator()
 
         # numeric
-        layout.operator("mesh.select_random", text="Random")
+        layout.operator("mesh.select_random", text="Select Random")
         layout.operator("mesh.select_nth")
 
         layout.separator()
 
         # geometric
-        layout.operator("mesh.edges_select_sharp", text="Sharp Edges")
+        layout.operator("mesh.edges_select_sharp", text="Select Sharp Edges")
 
         layout.separator()
 
@@ -859,7 +858,7 @@ class VIEW3D_MT_select_edit_mesh(Menu):
         layout.separator()
 
         layout.operator("mesh.select_axis", text="Side of Active")
-        layout.operator("mesh.select_mirror", text="Mirror")
+        layout.operator("mesh.select_mirror", text="Mirror Selection")
 
 
 class VIEW3D_MT_select_edit_curve(Menu):
@@ -935,10 +934,6 @@ class VIEW3D_MT_select_edit_text(Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.menu("VIEW3D_MT_undo_redo")
-
-        layout.separator()
-
         layout.operator("font.text_paste", text="Paste")
         layout.operator("font.text_cut", text="Cut")
         layout.operator("font.text_copy", text="Copy")
@@ -1205,7 +1200,8 @@ class INFO_MT_surface_add(Menu):
         layout.operator("surface.primitive_nurbs_surface_curve_add", text="Nurbs Curve", icon='SURFACE_NCURVE')
         layout.operator("surface.primitive_nurbs_surface_circle_add", text="Nurbs Circle", icon='SURFACE_NCIRCLE')
         layout.operator("surface.primitive_nurbs_surface_surface_add", text="Nurbs Surface", icon='SURFACE_NSURFACE')
-        layout.operator("surface.primitive_nurbs_surface_cylinder_add", text="Nurbs Cylinder", icon='SURFACE_NCYLINDER')
+        layout.operator("surface.primitive_nurbs_surface_cylinder_add",
+                        text="Nurbs Cylinder", icon='SURFACE_NCYLINDER')
         layout.operator("surface.primitive_nurbs_surface_sphere_add", text="Nurbs Sphere", icon='SURFACE_NSPHERE')
         layout.operator("surface.primitive_nurbs_surface_torus_add", text="Nurbs Torus", icon='SURFACE_NTORUS')
 
@@ -1337,7 +1333,11 @@ class INFO_MT_add(Menu):
 
         if len(bpy.data.collections) > 10:
             layout.operator_context = 'INVOKE_REGION_WIN'
-            layout.operator("object.collection_instance_add", text="Collection Instance...", icon='OUTLINER_OB_GROUP_INSTANCE')
+            layout.operator(
+                "object.collection_instance_add",
+                text="Collection Instance...",
+                icon='OUTLINER_OB_GROUP_INSTANCE',
+            )
         else:
             layout.operator_menu_enum(
                 "object.collection_instance_add",
@@ -1347,6 +1347,8 @@ class INFO_MT_add(Menu):
             )
 
 
+# Currently unused
+'''
 class VIEW3D_MT_undo_redo(Menu):
     bl_label = "Undo/Redo"
     _operator_name = ""
@@ -1360,6 +1362,7 @@ class VIEW3D_MT_undo_redo(Menu):
         layout.separator()
 
         layout.operator("ed.undo_history")
+'''
 
 
 class VIEW3D_MT_object_relations(Menu):
@@ -1390,36 +1393,30 @@ class VIEW3D_MT_object(Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.menu("VIEW3D_MT_undo_redo")
-
-        layout.separator()
-
-        layout.operator("object.delete", text="Delete...").use_global = False
-
-        layout.separator()
-
         layout.menu("VIEW3D_MT_transform_object")
         layout.menu("VIEW3D_MT_mirror")
         layout.menu("VIEW3D_MT_object_clear")
         layout.menu("VIEW3D_MT_object_apply")
-        layout.menu("VIEW3D_MT_object_shading")
+        layout.menu("VIEW3D_MT_snap")
 
         layout.separator()
 
-        layout.menu("VIEW3D_MT_object_parent")
-        layout.menu("VIEW3D_MT_object_collection")
-        layout.menu("VIEW3D_MT_snap")
+        layout.operator("object.shade_smooth", text="Smooth Shading")
+        layout.operator("object.shade_flat", text="Flat Shading")
 
         layout.separator()
 
         layout.operator("object.duplicate_move")
         layout.operator("object.duplicate_move_linked")
         layout.operator("object.join")
+
         layout.separator()
-        layout.menu("VIEW3D_MT_make_links", text="Make Links...")
+        layout.menu("VIEW3D_MT_object_parent")
+        layout.menu("VIEW3D_MT_object_collection")
         layout.menu("VIEW3D_MT_object_relations")
         layout.menu("VIEW3D_MT_object_constraints")
         layout.menu("VIEW3D_MT_object_track")
+        layout.menu("VIEW3D_MT_make_links", text="Make Links...")
 
         layout.separator()
 
@@ -1434,6 +1431,10 @@ class VIEW3D_MT_object(Menu):
 
         layout.operator_menu_enum("object.convert", "target")
 
+        layout.separator()
+
+        layout.operator("object.delete", text="Delete...").use_global = False
+
 
 class VIEW3D_MT_object_animation(Menu):
     bl_label = "Animation"
@@ -1883,10 +1884,6 @@ class VIEW3D_MT_paint_vertex(Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.menu("VIEW3D_MT_undo_redo")
-
-        layout.separator()
-
         layout.operator("paint.vertex_color_set")
         layout.operator("paint.vertex_color_smooth")
         layout.operator("paint.vertex_color_dirt")
@@ -1959,9 +1956,6 @@ class VIEW3D_MT_paint_weight(Menu):
     def draw_generic(layout, is_editmode=False):
 
         if not is_editmode:
-            layout.menu("VIEW3D_MT_undo_redo")
-
-            layout.separator()
 
             layout.operator("paint.weight_from_bones", text="Assign Automatic From Bones").type = 'AUTOMATIC'
             layout.operator("paint.weight_from_bones", text=

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list