[Bf-blender-cvs] [3097119] master: Add object & pose-mode select more/less menus

Campbell Barton noreply at git.blender.org
Wed Jan 13 23:56:56 CET 2016


Commit: 30971199aced817a1fa089e6fdeefe0c345e4c48
Author: Campbell Barton
Date:   Thu Jan 14 09:41:11 2016 +1100
Branches: master
https://developer.blender.org/rB30971199aced817a1fa089e6fdeefe0c345e4c48

Add object & pose-mode select more/less menus

Exposes object parent/child select, which wasn't in any menus.

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

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 6140c15..0c41675 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -552,8 +552,40 @@ class VIEW3D_MT_view_cameras(Menu):
         layout.operator("view3d.object_as_camera")
         layout.operator("view3d.viewnumpad", text="Active Camera").type = 'CAMERA'
 
+
 # ********** Select menus, suffix from context.mode **********
 
+class VIEW3D_MT_select_object_more_less(Menu):
+    bl_label = "Select More/Less"
+
+    def draw(self, context):
+        layout = self.layout
+
+        layout = self.layout
+
+        layout.operator("object.select_more", text="More")
+        layout.operator("object.select_less", text="Less")
+
+        layout.separator()
+
+        props = layout.operator("object.select_hierarchy", text="Parent")
+        props.extend = False
+        props.direction = 'PARENT'
+
+        props = layout.operator("object.select_hierarchy", text="Child")
+        props.extend = False
+        props.direction = 'CHILD'
+
+        layout.separator()
+
+        props = layout.operator("object.select_hierarchy", text="Extend Parent")
+        props.extend = True
+        props.direction = 'PARENT'
+
+        props = layout.operator("object.select_hierarchy", text="Extend Child")
+        props.extend = True
+        props.direction = 'CHILD'
+
 
 class VIEW3D_MT_select_object(Menu):
     bl_label = "Select"
@@ -576,29 +608,22 @@ class VIEW3D_MT_select_object(Menu):
 
         layout.separator()
 
+        layout.menu("VIEW3D_MT_select_object_more_less")
+
+        layout.separator()
+
         layout.operator_menu_enum("object.select_grouped", "type", text="Grouped")
         layout.operator_menu_enum("object.select_linked", "type", text="Linked")
         layout.operator("object.select_pattern", text="Select Pattern...")
 
 
-class VIEW3D_MT_select_pose(Menu):
-    bl_label = "Select"
+class VIEW3D_MT_select_pose_more_less(Menu):
+    bl_label = "Select More/Less"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("view3d.select_border")
-        layout.operator("view3d.select_circle")
-
-        layout.separator()
-
-        layout.operator("pose.select_all").action = 'TOGGLE'
-        layout.operator("pose.select_all", text="Inverse").action = 'INVERT'
-        layout.operator("pose.select_mirror", text="Flip Active")
-        layout.operator("pose.select_constraint_target", text="Constraint Target")
-        layout.operator("pose.select_linked", text="Linked")
-
-        layout.separator()
+        layout = self.layout
 
         props = layout.operator("pose.select_hierarchy", text="Parent")
         props.extend = False
@@ -618,6 +643,28 @@ class VIEW3D_MT_select_pose(Menu):
         props.extend = True
         props.direction = 'CHILD'
 
+
+class VIEW3D_MT_select_pose(Menu):
+    bl_label = "Select"
+
+    def draw(self, context):
+        layout = self.layout
+
+        layout.operator("view3d.select_border")
+        layout.operator("view3d.select_circle")
+
+        layout.separator()
+
+        layout.operator("pose.select_all").action = 'TOGGLE'
+        layout.operator("pose.select_all", text="Inverse").action = 'INVERT'
+        layout.operator("pose.select_mirror", text="Flip Active")
+        layout.operator("pose.select_constraint_target", text="Constraint Target")
+        layout.operator("pose.select_linked", text="Linked")
+
+        layout.separator()
+
+        layout.menu("VIEW3D_MT_select_pose_more_less")
+
         layout.separator()
 
         layout.operator_menu_enum("pose.select_grouped", "type", text="Grouped")




More information about the Bf-blender-cvs mailing list