Rework/New: Object & Mesh Select Pies #21

Merged
Demeter Dzadik merged 10 commits from selection_pies into main 2024-09-08 13:06:57 +02:00
Showing only changes of commit b5288e7d81 - Show all commits

View File

@ -551,9 +551,9 @@ class PIE_MT_mesh_selection(Menu):
# 9 - TOP - RIGHT
pie.operator("mesh.select_linked", text="Select Linked", icon='FILE_3D')
# 1 - BOTTOM - LEFT
pie.separator()
pie.operator('wm.call_menu_pie', text='Select Loops...', icon='MOD_WAVE').name='PIE_MT_mesh_selection_loops'
# 3 - BOTTOM - RIGHT
pie.menu("PIE_MT_mesh_selection_more", text="Select Menu", icon='THREE_DOTS')
pie.menu("PIE_MT_mesh_selection_more", text="More...", icon='THREE_DOTS')
class PIE_MT_mesh_selection_more(Menu):
@ -581,7 +581,6 @@ class PIE_MT_mesh_selection_more(Menu):
layout.menu("VIEW3D_MT_edit_mesh_select_linked", icon='FILE_3D')
layout.menu("VIEW3D_MT_edit_mesh_select_similar", icon='CON_TRANSLIKE')
layout.operator_menu_enum("mesh.select_axis", "axis", text="Select Side", icon='AXIS_SIDE')
layout.menu("VIEW3D_MT_edit_mesh_select_loops")
layout.operator("mesh.select_nth", text="Checker Deselect", icon='TEXTURE')
# Select based on some parameter.
@ -593,6 +592,23 @@ class PIE_MT_mesh_selection_more(Menu):
layout.template_node_operator_asset_menu_items(catalog_path="Select")
class PIE_MT_mesh_selection_loops(Menu):
bl_idname = "PIE_MT_mesh_selection_loops"
bl_label = "Select Loop"
def draw(self, context):
pie = self.layout.menu_pie()
# 4 - LEFT
pie.operator('mesh.loop_multi_select', text="Edge Loops", icon='MOD_WAVE').ring=False
# 6 - RIGHT
pie.operator('mesh.loop_multi_select', text="Edge Rings", icon='CURVES').ring=True
# 2 - BOTTOM
pie.operator('mesh.loop_to_region', text="Loop Inner Region", icon='SHADING_SOLID')
# 8 - TOP
pie.operator('mesh.region_to_loop', text="Boundary Loop", icon='MESH_CIRCLE')
registry = [
PIE_MT_object_selection,
PIE_MT_object_selection_more,
@ -611,6 +627,7 @@ registry = [
PIE_MT_mesh_selection,
PIE_MT_mesh_selection_more,
PIE_MT_mesh_selection_loops,
]