UI: Reorganize 'Select' menus in editors #121337
@ -302,6 +302,8 @@ class CLIP_MT_tracking_editor_menus(Menu):
|
||||
layout.menu("CLIP_MT_reconstruction")
|
||||
else:
|
||||
layout.menu("CLIP_MT_clip")
|
||||
elif sc.view == 'GRAPH':
|
||||
layout.menu("CLIP_MT_select_graph")
|
||||
|
||||
|
||||
class CLIP_MT_masking_editor_menus(Menu):
|
||||
@ -1586,21 +1588,35 @@ class CLIP_MT_select(Menu):
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("clip.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("clip.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("clip.select_all", text="Inverse").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("clip.select_box")
|
||||
layout.operator("clip.select_circle")
|
||||
layout.operator_menu_enum("clip.select_lasso", "mode")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("clip.select_all").action = 'TOGGLE'
|
||||
layout.operator("clip.select_all", text="Inverse").action = 'INVERT'
|
||||
|
||||
layout.menu("CLIP_MT_select_grouped")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("clip.stabilize_2d_select")
|
||||
layout.operator("clip.stabilize_2d_rotation_select")
|
||||
layout.operator("clip.stabilize_2d_select", text="Stabilization Tracks")
|
||||
layout.operator("clip.stabilize_2d_rotation_select", text="Stabilization Rotation Tracks")
|
||||
|
||||
|
||||
class CLIP_MT_select_graph(Menu):
|
||||
bl_label = "Select"
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("clip.graph_select_all_markers", text="All").action="SELECT"
|
||||
layout.operator("clip.graph_select_all_markers", text="None").action="DESELECT"
|
||||
layout.operator("clip.graph_select_all_markers", text="Invert").action="INVERT"
|
||||
|
||||
|
||||
class CLIP_MT_tracking_context_menu(Menu):
|
||||
@ -1989,6 +2005,7 @@ classes = (
|
||||
CLIP_MT_track_visibility,
|
||||
CLIP_MT_track_cleanup,
|
||||
CLIP_MT_select,
|
||||
CLIP_MT_select_graph,
|
||||
CLIP_MT_select_grouped,
|
||||
CLIP_MT_tracking_context_menu,
|
||||
CLIP_MT_plane_track_image_context_menu,
|
||||
|
@ -454,10 +454,18 @@ class DOPESHEET_MT_select(Menu):
|
||||
layout.separator()
|
||||
layout.operator("action.select_box").axis_range = False
|
||||
layout.operator("action.select_box", text="Box Select (Axis Range)").axis_range = True
|
||||
|
||||
layout.operator("action.select_circle")
|
||||
layout.operator_menu_enum("action.select_lasso", "mode")
|
||||
|
||||
# FIXME: grease pencil mode isn't supported for these yet, so skip for that mode only
|
||||
if context.space_data.mode != 'GPENCIL':
|
||||
layout.separator()
|
||||
layout.operator("action.select_more", text="More")
|
||||
layout.operator("action.select_less", text="Less")
|
||||
|
||||
layout.separator()
|
||||
layout.operator("action.select_linked")
|
||||
|
||||
layout.separator()
|
||||
layout.operator("action.select_column", text="Columns on Selected Keys").mode = 'KEYS'
|
||||
layout.operator("action.select_column", text="Column on Current Frame").mode = 'CFRA'
|
||||
@ -473,15 +481,6 @@ class DOPESHEET_MT_select(Menu):
|
||||
props.extend = False
|
||||
props.mode = 'RIGHT'
|
||||
|
||||
# FIXME: grease pencil mode isn't supported for these yet, so skip for that mode only
|
||||
if context.space_data.mode != 'GPENCIL':
|
||||
layout.separator()
|
||||
layout.operator("action.select_more")
|
||||
layout.operator("action.select_less")
|
||||
|
||||
layout.separator()
|
||||
layout.operator("action.select_linked")
|
||||
|
||||
|
||||
class DOPESHEET_MT_marker(Menu):
|
||||
bl_label = "Marker"
|
||||
|
@ -680,7 +680,7 @@ class ASSETBROWSER_MT_select(AssetBrowserMenu, Menu):
|
||||
|
||||
layout.operator("file.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("file.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("file.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("file.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
@ -205,10 +205,16 @@ class GRAPH_MT_select(Menu):
|
||||
props.axis_range = True
|
||||
props = layout.operator("graph.select_box", text="Box Select (Include Handles)")
|
||||
props.include_handles = True
|
||||
|
||||
layout.operator("graph.select_circle")
|
||||
layout.operator_menu_enum("graph.select_lasso", "mode")
|
||||
|
||||
layout.separator()
|
||||
layout.operator("graph.select_more", text="More")
|
||||
layout.operator("graph.select_less", text="Less")
|
||||
|
||||
layout.separator()
|
||||
layout.operator("graph.select_linked")
|
||||
|
||||
layout.separator()
|
||||
layout.operator("graph.select_column", text="Columns on Selected Keys").mode = 'KEYS'
|
||||
layout.operator("graph.select_column", text="Column on Current Frame").mode = 'CFRA'
|
||||
@ -234,13 +240,6 @@ class GRAPH_MT_select(Menu):
|
||||
props.right_handle_action = 'DESELECT'
|
||||
props.key_action = 'SELECT'
|
||||
|
||||
layout.separator()
|
||||
layout.operator("graph.select_more")
|
||||
layout.operator("graph.select_less")
|
||||
|
||||
layout.separator()
|
||||
layout.operator("graph.select_linked")
|
||||
|
||||
|
||||
class GRAPH_MT_marker(Menu):
|
||||
bl_label = "Marker"
|
||||
|
@ -154,20 +154,21 @@ class IMAGE_MT_select(Menu):
|
||||
layout.operator("uv.select_box").pinned = False
|
||||
layout.operator("uv.select_box", text="Box Select Pinned").pinned = True
|
||||
layout.operator("uv.select_circle")
|
||||
layout.operator_menu_enum("uv.select_lasso", "mode", text="Lasso Select")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("uv.select_less", text="Less")
|
||||
layout.operator("uv.select_more", text="More")
|
||||
layout.operator("uv.select_less", text="Less")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("uv.select_pinned")
|
||||
layout.operator_menu_enum("uv.select_similar", "type", text="Select Similar")
|
||||
layout.menu("IMAGE_MT_select_linked")
|
||||
layout.operator("uv.select_similar")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("uv.select_pinned", text="Select Pinned")
|
||||
layout.operator("uv.select_split")
|
||||
layout.operator("uv.select_overlap")
|
||||
|
||||
|
@ -303,25 +303,29 @@ class NODE_MT_select(Menu):
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("node.select_all", text="All").action = 'SELECT'
|
||||
layout.operator("node.select_all", text="None").action = 'DESELECT'
|
||||
layout.operator("node.select_all", text="Invert").action = 'INVERT'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("node.select_box").tweak = False
|
||||
layout.operator("node.select_circle")
|
||||
layout.operator_menu_enum("node.select_lasso", "mode")
|
||||
|
||||
layout.separator()
|
||||
layout.operator("node.select_all").action = 'TOGGLE'
|
||||
layout.operator("node.select_all", text="Invert").action = 'INVERT'
|
||||
layout.operator("node.select_linked_from")
|
||||
layout.operator("node.select_linked_to")
|
||||
layout.operator("node.select_linked_from", text="Linked from")
|
||||
layout.operator("node.select_linked_to", text="Linked to")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("node.select_grouped").extend = False
|
||||
layout.operator_menu_enum("node.select_grouped", "type", text="Select Grouped")
|
||||
layout.operator("node.select_same_type_step", text="Activate Same Type Previous").prev = True
|
||||
layout.operator("node.select_same_type_step", text="Activate Same Type Next").prev = False
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("node.find_node")
|
||||
layout.operator("node.find_node", text="Find Node...")
|
||||
|
||||
|
||||
class NODE_MT_node(Menu):
|
||||
|
@ -539,17 +539,6 @@ class SEQUENCER_MT_select_channel(Menu):
|
||||
layout.operator("sequencer.select_side", text="Both Sides").side = 'BOTH'
|
||||
|
||||
|
||||
class SEQUENCER_MT_select_linked(Menu):
|
||||
bl_label = "Select Linked"
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("sequencer.select_linked", text="All")
|
||||
layout.operator("sequencer.select_less", text="Less")
|
||||
layout.operator("sequencer.select_more", text="More")
|
||||
|
||||
|
||||
class SEQUENCER_MT_select(Menu):
|
||||
bl_label = "Select"
|
||||
|
||||
@ -574,16 +563,21 @@ class SEQUENCER_MT_select(Menu):
|
||||
|
||||
col.separator()
|
||||
|
||||
if has_sequencer:
|
||||
col.operator("sequencer.select_more", text="More")
|
||||
col.operator("sequencer.select_less", text="Less")
|
||||
col.separator()
|
||||
|
||||
col.operator_menu_enum("sequencer.select_grouped", "type", text="Select Grouped")
|
||||
col.enabled = not is_retiming
|
||||
if has_sequencer:
|
||||
col.operator("sequencer.select_linked", text="Select Linked")
|
||||
col.separator()
|
||||
|
||||
if has_sequencer:
|
||||
col.operator_menu_enum("sequencer.select_side_of_frame", "side", text="Side of Frame...")
|
||||
col.menu("SEQUENCER_MT_select_handle", text="Handle")
|
||||
col.menu("SEQUENCER_MT_select_channel", text="Channel")
|
||||
col.menu("SEQUENCER_MT_select_linked", text="Linked")
|
||||
|
||||
col.separator()
|
||||
|
||||
col.operator_menu_enum("sequencer.select_grouped", "type", text="Grouped")
|
||||
col.enabled = not is_retiming
|
||||
|
||||
|
||||
class SEQUENCER_MT_marker(Menu):
|
||||
@ -2796,7 +2790,6 @@ classes = (
|
||||
SEQUENCER_MT_proxy,
|
||||
SEQUENCER_MT_select_handle,
|
||||
SEQUENCER_MT_select_channel,
|
||||
SEQUENCER_MT_select_linked,
|
||||
SEQUENCER_MT_select,
|
||||
SEQUENCER_MT_marker,
|
||||
SEQUENCER_MT_navigation,
|
||||
|
Loading…
Reference in New Issue
Block a user