diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-08 09:07:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-08 09:07:56 +0300 |
commit | ebe216f532845069bc5bb7b45e2eda03756b81cc (patch) | |
tree | e7b4431caf75e1d5432a7e76c8c52ae1974029d4 /release/scripts/startup/bl_ui/space_sequencer.py | |
parent | de07bf2b13e8239b5175e9c4b79fc09f096b1b86 (diff) |
Sequencer: add option to toggle gizmos
Use shortcut matching the 3D view & popover in the header
Diffstat (limited to 'release/scripts/startup/bl_ui/space_sequencer.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 58afb6d9203..665e7c54fa7 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -205,6 +205,17 @@ class SEQUENCER_HT_header(Header): layout.prop(st, "display_mode", text="", icon_only=True) layout.prop(st, "preview_channels", text="", icon_only=True) + # Gizmo toggle & popover. + row = layout.row(align=True) + # FIXME: place-holder icon. + row.prop(st, "show_gizmo", text="", toggle=True, icon='GIZMO') + sub = row.row(align=True) + sub.active = st.show_gizmo + sub.popover( + panel="SEQUENCER_PT_gizmo_display", + text="", + ) + row = layout.row(align=True) row.prop(st, "show_strip_overlay", text="", icon='OVERLAY') sub = row.row(align=True) @@ -230,6 +241,29 @@ class SEQUENCER_MT_editor_menus(Menu): layout.menu("SEQUENCER_MT_strip") +class SEQUENCER_PT_gizmo_display(Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'HEADER' + bl_label = "Gizmo" + bl_ui_units_x = 8 + + def draw(self, context): + layout = self.layout + + scene = context.scene + st = context.space_data + + col = layout.column() + col.label(text="Viewport Gizmos") + col.separator() + + col.active = st.show_gizmo + colsub = col.column() + colsub.prop(st, "show_gizmo_navigate", text="Navigate") + colsub.prop(st, "show_gizmo_tool", text="Active Tools") + # colsub.prop(st, "show_gizmo_context", text="Active Object") # Currently unused. + + class SEQUENCER_PT_overlay(Panel): bl_space_type = 'SEQUENCE_EDITOR' bl_region_type = 'HEADER' @@ -2503,6 +2537,7 @@ classes = ( SEQUENCER_PT_active_tool, SEQUENCER_PT_strip, + SEQUENCER_PT_gizmo_display, SEQUENCER_PT_overlay, SEQUENCER_PT_preview_overlay, SEQUENCER_PT_sequencer_overlay, |