Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-10-08 09:07:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-08 09:07:56 +0300
commitebe216f532845069bc5bb7b45e2eda03756b81cc (patch)
treee7b4431caf75e1d5432a7e76c8c52ae1974029d4 /release
parentde07bf2b13e8239b5175e9c4b79fc09f096b1b86 (diff)
Sequencer: add option to toggle gizmos
Use shortcut matching the 3D view & popover in the header
Diffstat (limited to 'release')
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py11
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py35
2 files changed, 45 insertions, 1 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 7152069972d..16cfb1e4760 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -2826,7 +2826,6 @@ def km_sequencerpreview(params):
value=params.select_mouse_value_fallback,
legacy=params.legacy,
),
- op_menu_pie("SEQUENCER_MT_pivot_pie", {"type": 'PERIOD', "value": 'PRESS'}),
("sequencer.view_all_preview", {"type": 'HOME', "value": 'PRESS'}, None),
("sequencer.view_all_preview", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None),
@@ -2864,6 +2863,16 @@ def km_sequencerpreview(params):
*_template_items_context_menu("SEQUENCER_MT_preview_context_menu", params.context_menu_event),
])
+ if not params.legacy:
+ # New pie menus.
+ items.extend([
+ ("wm.context_toggle", {"type": 'ACCENT_GRAVE', "value": 'PRESS', "ctrl": True},
+ {"properties": [("data_path", 'space_data.show_gizmo')]}),
+ op_menu_pie("SEQUENCER_MT_pivot_pie", {"type": 'PERIOD', "value": 'PRESS'}),
+ ("wm.context_toggle", {"type": 'Z', "value": 'PRESS', "alt": True, "shift": True},
+ {"properties": [("data_path", "space_data.overlay.show_overlays")]}),
+ ])
+
# 2D cursor.
if params.cursor_tweak_event:
items.extend([
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,