[Bf-blender-cvs] [fb96dcd7139] master: UI: Avoid double separators in some circumstances in the object context menu

William Reynish noreply at git.blender.org
Tue Mar 26 14:48:37 CET 2019


Commit: fb96dcd71395b5bb9b4f37c822cac802c98ebb42
Author: William Reynish
Date:   Tue Mar 26 14:48:35 2019 +0100
Branches: master
https://developer.blender.org/rBfb96dcd71395b5bb9b4f37c822cac802c98ebb42

UI: Avoid double separators in some circumstances in the object context menu

Also make placement of Rename more consistent between object and bones.

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

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 a64dff9051b..dfc81d476ce 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1833,6 +1833,8 @@ class VIEW3D_MT_object_context_menu(Menu):
             if selected_objects_len > 1:
                 layout.operator("object.join")
 
+            layout.separator()
+
         elif obj.type == 'CAMERA':
             layout.operator_context = 'INVOKE_REGION_WIN'
 
@@ -1863,6 +1865,8 @@ class VIEW3D_MT_object_context_menu(Menu):
                     props.input_scale = 0.02
                     props.header_text = "DOF Distance: %.3f"
 
+            layout.separator()
+
         elif obj.type in {'CURVE', 'FONT'}:
             layout.operator_context = 'INVOKE_REGION_WIN'
 
@@ -1882,6 +1886,8 @@ class VIEW3D_MT_object_context_menu(Menu):
 
             layout.operator_menu_enum("object.origin_set", text="Set Origin", property="type")
 
+            layout.separator()
+
         elif obj.type == 'GPENCIL':
             layout.operator("gpencil.convert", text="Convert to Path").type = 'PATH'
             layout.operator("gpencil.convert", text="Convert to Bezier Curves").type = 'CURVE'
@@ -1889,6 +1895,8 @@ class VIEW3D_MT_object_context_menu(Menu):
 
             layout.operator_menu_enum("object.origin_set", text="Set Origin", property="type")
 
+            layout.separator()
+
         elif obj.type == 'EMPTY':
             layout.operator_context = 'INVOKE_REGION_WIN'
 
@@ -1898,6 +1906,8 @@ class VIEW3D_MT_object_context_menu(Menu):
             props.input_scale = 0.01
             props.header_text = "Empty Draw Size: %.3f"
 
+            layout.separator()
+
         elif obj.type == 'LIGHT':
             light = obj.data
 
@@ -1960,13 +1970,7 @@ class VIEW3D_MT_object_context_menu(Menu):
                 props.input_scale = -0.01
                 props.header_text = "Spot Blend: %.2f"
 
-        layout.separator()
-
-        props = layout.operator("wm.call_panel", text="Rename Active Object...")
-        props.name = "TOPBAR_PT_name"
-        props.keep_open = False
-
-        layout.separator()
+            layout.separator()
 
         layout.operator("view3d.copybuffer", text="Copy Objects", icon='COPYDOWN')
         layout.operator("view3d.pastebuffer", text="Paste Objects", icon='PASTEDOWN')
@@ -1978,6 +1982,12 @@ class VIEW3D_MT_object_context_menu(Menu):
 
         layout.separator()
 
+        props = layout.operator("wm.call_panel", text="Rename Active Object...")
+        props.name = "TOPBAR_PT_name"
+        props.keep_open = False
+
+        layout.separator()
+
         layout.menu("VIEW3D_MT_mirror")
         layout.menu("VIEW3D_MT_snap")
         layout.menu("VIEW3D_MT_object_parent")



More information about the Bf-blender-cvs mailing list