Keymap: Select/De-Select support for anim-editors
Also update menu items, adding select/de-select.
This commit is contained in:
@@ -378,6 +378,12 @@ class MASK_MT_select(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("mask.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("mask.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("mask.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("mask.select_border")
|
||||
layout.operator("mask.select_circle")
|
||||
|
||||
@@ -388,8 +394,6 @@ class MASK_MT_select(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("mask.select_all").action = 'TOGGLE'
|
||||
layout.operator("mask.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("mask.select_linked", text="Select Linked")
|
||||
|
||||
|
||||
|
||||
@@ -358,9 +358,9 @@ class DOPESHEET_MT_select(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
# This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
|
||||
layout.operator("action.select_all_toggle").invert = False
|
||||
layout.operator("action.select_all_toggle", text="Invert Selection").invert = True
|
||||
layout.operator("action.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("action.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("action.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
layout.operator("action.select_border").axis_range = False
|
||||
|
||||
@@ -165,11 +165,12 @@ class GRAPH_MT_select(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
# This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
|
||||
layout.operator("graph.select_all_toggle").invert = False
|
||||
layout.operator("graph.select_all_toggle", text="Invert Selection").invert = True
|
||||
layout.operator("graph.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("graph.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("graph.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
props = layout.operator("graph.select_border")
|
||||
props.axis_range = False
|
||||
props.include_handles = False
|
||||
|
||||
@@ -139,14 +139,20 @@ class IMAGE_MT_select(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("uv.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("uv.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("uv.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("uv.select_border").pinned = False
|
||||
layout.operator("uv.select_border", text="Border Select Pinned").pinned = True
|
||||
layout.operator("uv.circle_select")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("uv.select_all").action = 'TOGGLE'
|
||||
layout.operator("uv.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("uv.select_less", text="Less")
|
||||
layout.operator("uv.select_more", text="More")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -155,11 +161,6 @@ class IMAGE_MT_select(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("uv.select_less", text="Less")
|
||||
layout.operator("uv.select_more", text="More")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("uv.select_split")
|
||||
|
||||
|
||||
|
||||
@@ -126,9 +126,9 @@ class NLA_MT_select(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
# This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
|
||||
layout.operator("nla.select_all_toggle").invert = False
|
||||
layout.operator("nla.select_all_toggle", text="Invert Selection").invert = True
|
||||
layout.operator("nla.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("nla.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("nla.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
layout.operator("nla.select_border").axis_range = False
|
||||
|
||||
@@ -249,6 +249,12 @@ class SEQUENCER_MT_select(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("sequencer.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("sequencer.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("sequencer.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("sequencer.select_active_side", text="Strips to the Left").side = 'LEFT'
|
||||
layout.operator("sequencer.select_active_side", text="Strips to the Right").side = 'RIGHT'
|
||||
props = layout.operator("sequencer.select", text="All Strips to the Left")
|
||||
@@ -267,8 +273,6 @@ class SEQUENCER_MT_select(Menu):
|
||||
layout.operator("sequencer.select_linked")
|
||||
layout.operator("sequencer.select_less")
|
||||
layout.operator("sequencer.select_more")
|
||||
layout.operator("sequencer.select_all").action = 'TOGGLE'
|
||||
layout.operator("sequencer.select_all", text="Inverse").action = 'INVERT'
|
||||
|
||||
|
||||
class SEQUENCER_MT_marker(Menu):
|
||||
|
||||
@@ -739,15 +739,19 @@ class VIEW3D_MT_select_object(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("object.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("object.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("object.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
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 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")
|
||||
|
||||
@@ -795,13 +799,17 @@ class VIEW3D_MT_select_pose(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("pose.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("pose.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("pose.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
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.separator()
|
||||
@@ -825,14 +833,18 @@ class VIEW3D_MT_select_particle(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("particle.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("particle.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("particle.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("particle.select_all").action = 'TOGGLE'
|
||||
layout.operator("particle.select_linked")
|
||||
layout.operator("particle.select_all", text="Inverse").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -926,14 +938,15 @@ class VIEW3D_MT_select_edit_mesh(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
# primitive
|
||||
layout.operator("mesh.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("mesh.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("mesh.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
# primitive
|
||||
layout.operator("mesh.select_all", text="Select/Deselect All").action = 'TOGGLE'
|
||||
layout.operator("mesh.select_all", text="Inverse Selection").action = 'INVERT'
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -979,13 +992,14 @@ class VIEW3D_MT_select_edit_curve(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
layout.operator("curve.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("curve.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("curve.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("curve.select_all").action = 'TOGGLE'
|
||||
layout.operator("curve.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1013,13 +1027,14 @@ class VIEW3D_MT_select_edit_surface(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
layout.operator("curve.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("curve.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("curve.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("curve.select_all").action = 'TOGGLE'
|
||||
layout.operator("curve.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1065,13 +1080,14 @@ class VIEW3D_MT_select_edit_metaball(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
layout.operator("mball.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("mball.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("mball.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("mball.select_all").action = 'TOGGLE'
|
||||
layout.operator("mball.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1088,13 +1104,14 @@ class VIEW3D_MT_select_edit_lattice(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
layout.operator("lattice.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("lattice.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("lattice.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("lattice.select_all").action = 'TOGGLE'
|
||||
layout.operator("lattice.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1112,13 +1129,17 @@ class VIEW3D_MT_select_edit_armature(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("armature.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("armature.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("armature.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("armature.select_all").action = 'TOGGLE'
|
||||
layout.operator("armature.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("armature.select_mirror", text="Mirror").extend = False
|
||||
|
||||
layout.separator()
|
||||
@@ -1156,13 +1177,14 @@ class VIEW3D_MT_select_gpencil(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("gpencil.select_border")
|
||||
layout.operator("gpencil.select_circle")
|
||||
layout.operator("gpencil.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("gpencil.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("gpencil.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("gpencil.select_all", text="(De)select All").action = 'TOGGLE'
|
||||
layout.operator("gpencil.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("gpencil.select_border")
|
||||
layout.operator("gpencil.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1186,13 +1208,14 @@ class VIEW3D_MT_select_paint_mask(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
layout.operator("paint.face_select_all", text="All").action = 'SELECT'
|
||||
layout.operator("paint.face_select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("paint.face_select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("paint.face_select_all").action = 'TOGGLE'
|
||||
layout.operator("paint.face_select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1205,13 +1228,14 @@ class VIEW3D_MT_select_paint_mask_vertex(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
layout.operator("paint.vert_select_all", text="All").action = 'SELECT'
|
||||
layout.operator("paint.vert_select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("paint.vert_select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("paint.vert_select_all").action = 'TOGGLE'
|
||||
layout.operator("paint.vert_select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("view3d.select_border")
|
||||
layout.operator("view3d.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -2278,6 +2302,13 @@ class VIEW3D_MT_particle_specials(Menu):
|
||||
|
||||
if particle_edit.select_mode == 'POINT':
|
||||
layout.separator()
|
||||
|
||||
layout.operator("particle.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("particle.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("particle.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("particle.select_roots")
|
||||
layout.operator("particle.select_tips")
|
||||
|
||||
@@ -2292,9 +2323,7 @@ class VIEW3D_MT_particle_specials(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("particle.select_all").action = 'TOGGLE'
|
||||
layout.operator("particle.select_linked")
|
||||
layout.operator("particle.select_all", text="Inverse").action = 'INVERT'
|
||||
|
||||
|
||||
class VIEW3D_MT_particle_showhide(ShowHideMenu, Menu):
|
||||
|
||||
Reference in New Issue
Block a user