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:
authorWilliam Reynish <billrey@me.com>2019-05-07 22:07:52 +0300
committerWilliam Reynish <billrey@me.com>2019-05-07 22:07:52 +0300
commitbea5d9db840d797cfde9fd6a660bda25795652cb (patch)
treef24961a4679b8cf5485b5c40c8e3f4588545b435
parent9b4a57f74cb2a089756637d124b87806e0b05e8b (diff)
UI: Add initial context menu to Sequencer
Add to both Blender and Industry Compat keymap
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py1
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py1
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py61
3 files changed, 63 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 acd3b44de2c..56e1ecb9fdf 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -2435,6 +2435,7 @@ def km_sequencer(params):
("sequencer.select_grouped", {"type": 'G', "value": 'PRESS', "shift": True}, None),
op_menu("SEQUENCER_MT_add", {"type": 'A', "value": 'PRESS', "shift": True}),
op_menu("SEQUENCER_MT_change", {"type": 'C', "value": 'PRESS'}),
+ op_menu("SEQUENCER_MT_channel_context_menu", params.context_menu_event),
("sequencer.slip", {"type": 'S', "value": 'PRESS'}, None),
("wm.context_set_int", {"type": 'O', "value": 'PRESS'},
{"properties": [("data_path", 'scene.sequence_editor.overlay_frame'), ("value", 0)]}),
diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
index 5ca2ecb9b8b..16fc8bc2496 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -1766,6 +1766,7 @@ def km_sequencer(params):
("transform.seq_slide", {"type": 'EVT_TWEAK_M', "value": 'ANY'}, None),
("transform.transform", {"type": 'E', "value": 'PRESS'},
{"properties": [("mode", 'TIME_EXTEND')]}),
+ op_menu("SEQUENCER_MT_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
("marker.add", {"type": 'M', "value": 'PRESS'}, None),
("marker.rename", {"type": 'RET', "value": 'PRESS'}, None),
])
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 7f54276c7e5..f483ada5d44 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -598,6 +598,66 @@ class SEQUENCER_MT_strip(Menu):
layout.menu("SEQUENCER_MT_strip_lock_mute")
+class SEQUENCER_MT_context_menu(Menu):
+ bl_label = "Sequencer Context Menu"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator_context = 'INVOKE_REGION_WIN'
+
+ layout.operator("sequencer.copy", text="Copy")
+ layout.operator("sequencer.paste", text="Paste")
+ layout.operator("sequencer.duplicate_move")
+ layout.operator("sequencer.delete", text="Delete...")
+
+ layout.separator()
+
+ layout.operator("sequencer.cut", text="Cut (Hard) at frame").type = 'HARD'
+ layout.operator("sequencer.cut", text="Cut (Soft) at frame").type = 'SOFT'
+
+ layout.separator()
+
+ layout.operator("sequencer.snap")
+ layout.operator("sequencer.offset_clear")
+
+
+ strip = act_strip(context)
+
+ if strip:
+ stype = strip.type
+
+ if stype in {
+ 'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
+ 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW',
+ 'TRANSFORM', 'COLOR', 'SPEED', 'MULTICAM', 'ADJUSTMENT',
+ 'GAUSSIAN_BLUR', 'TEXT',
+ }:
+ layout.separator()
+ layout.operator_menu_enum("sequencer.change_effect_input", "swap")
+ layout.operator_menu_enum("sequencer.change_effect_type", "type")
+ layout.operator("sequencer.reassign_inputs")
+ layout.operator("sequencer.swap_inputs")
+ elif stype in {'IMAGE', 'MOVIE'}:
+ layout.separator()
+ layout.operator("sequencer.rendersize")
+ layout.operator("sequencer.images_separate")
+ elif stype == 'SOUND':
+ layout.separator()
+ layout.operator("sequencer.crossfade_sounds")
+ elif stype == 'META':
+ layout.separator()
+ layout.operator("sequencer.meta_separate")
+
+ layout.separator()
+
+ layout.operator("sequencer.meta_make")
+
+ layout.separator()
+
+ layout.menu("SEQUENCER_MT_strip_input")
+
+
class SequencerButtonsPanel:
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
@@ -1486,6 +1546,7 @@ classes = (
SEQUENCER_MT_strip_transform,
SEQUENCER_MT_strip_input,
SEQUENCER_MT_strip_lock_mute,
+ SEQUENCER_MT_context_menu,
SEQUENCER_PT_edit,
SEQUENCER_PT_effect,
SEQUENCER_PT_input,