diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-06 06:45:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-06 06:54:05 +0300 |
commit | ce66075d0027d21044fe46591cd10d211443162a (patch) | |
tree | 316bdab9efd510357e70d18ae9027a84be1803bb /release/scripts | |
parent | c73a550e904086b06b5a02e246609222270a847d (diff) |
UI: add sequencer preview context menu
This is mostly a place-holder since many items
have not yet been implemented.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index c89f858602f..80ec9e0edfe 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -2869,6 +2869,7 @@ def km_sequencerpreview(params): {"properties": [("property", 'SCALE')]}), ("sequencer.strip_transform_clear", {"type": 'R', "alt": True, "value": 'PRESS'}, {"properties": [("property", 'ROTATION')]}), + *_template_items_context_menu("SEQUENCER_MT_preview_context_menu", params.context_menu_event), ]) return keymap diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index b5904422beb..dec754b8747 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -1021,6 +1021,27 @@ class SEQUENCER_MT_context_menu(Menu): layout.menu("SEQUENCER_MT_strip_lock_mute") +class SEQUENCER_MT_preview_context_menu(Menu): + bl_label = "Sequencer Preview Context Menu" + + def draw(self, context): + layout = self.layout + + layout.operator_context = 'INVOKE_REGION_WIN' + + props = layout.operator("wm.call_panel", text="Rename...") + props.name = "TOPBAR_PT_name" + props.keep_open = False + + # TODO: support in preview. + # layout.operator("sequencer.delete", text="Delete") + + strip = context.active_sequence_strip + + if strip: + pass + + class SequencerButtonsPanel: bl_space_type = 'SEQUENCE_EDITOR' bl_region_type = 'UI' @@ -2431,6 +2452,7 @@ classes = ( SEQUENCER_MT_strip_lock_mute, SEQUENCER_MT_color_tag_picker, SEQUENCER_MT_context_menu, + SEQUENCER_MT_preview_context_menu, SEQUENCER_PT_color_tag_picker, |