diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-05 15:04:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-05 15:14:02 +0300 |
commit | 74fa600ede93852e031c73322a43e807d1b9daf0 (patch) | |
tree | 79355d24fedfb92ac83e766adcdd9ceb8af8e99c /release | |
parent | d850daf416f75f1231d49cbf240151c13212a87a (diff) |
Sequencer: split select side of frame out of the select operator
The select operator was getting overloaded with functionality
unrelated to selecting the strip at the mouse position.
- Don't save settings, allowing the keymap only to include
non-default options.
- Fix selecting strips overlapping the current frame
overwrite all flags.
Diffstat (limited to 'release')
3 files changed, 25 insertions, 45 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 08e81d89c4f..1d43c486bca 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -2474,21 +2474,19 @@ def km_sequencer(params): ) ), ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS'}, - {"properties": [ - ("extend", False), ("deselect_all", True), - ("linked_handle", False), ("left_right", 'NONE'), ("linked_time", False)]}), + {"properties": [("deselect_all", True)]}), ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True}, - {"properties": [("extend", True), ("linked_handle", False), ("left_right", 'NONE'), ("linked_time", False)]}), + {"properties": [("extend", True)]}), ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "alt": True}, - {"properties": [("extend", False), ("linked_handle", True), ("left_right", 'NONE'), ("linked_time", False)]}), + {"properties": [("linked_handle", True)]}), ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True}, - {"properties": [("extend", True), ("linked_handle", True), ("left_right", 'NONE'), ("linked_time", False)]}), + {"properties": [("extend", True), ("linked_handle", True)]}), ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS' if params.legacy else 'CLICK', "ctrl": True}, - {"properties": [("linked_handle", False), ("left_right", 'MOUSE'), ("linked_time", True), ("extend", False)]}), + {"properties": [("side_of_frame", True), ("linked_time", True)]}), ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS' if params.legacy else 'CLICK', "ctrl": True, "shift": True}, - {"properties": [("linked_handle", False), ("left_right", 'MOUSE'), ("linked_time", True), ("extend", True)]}), + {"properties": [("side_of_frame", True), ("linked_time", True), ("extend", True)]}), ("sequencer.select_more", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True}, None), ("sequencer.select_less", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True}, None), ("sequencer.select_linked_pick", {"type": 'L', "value": 'PRESS'}, @@ -2517,18 +2515,18 @@ def km_sequencer(params): {"properties": [("mode", 'TIME_EXTEND')]}), ("marker.add", {"type": 'M', "value": 'PRESS'}, None), ("marker.rename", {"type": 'M', "value": 'PRESS', "ctrl": True}, None), - ("sequencer.select", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, - {"properties": [("left_right", 'LEFT'), ("linked_time", True)]}), - ("sequencer.select", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, - {"properties": [("left_right", 'RIGHT'), ("linked_time", True)]}), - ("sequencer.select", {"type": 'EQUAL', "value": 'PRESS'}, - {"properties": [("left_right", 'OVERLAP'), ("linked_time", True)]}), - ("sequencer.select", {"type": 'LEFT_BRACKET', "value": 'PRESS', "shift": True}, - {"properties": [("left_right", 'LEFT'), ("linked_time", True), ("extend", True)]}), - ("sequencer.select", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "shift": True}, - {"properties": [("left_right", 'RIGHT'), ("linked_time", True), ("extend", True)]}), - ("sequencer.select", {"type": 'EQUAL', "value": 'PRESS', "shift": True}, - {"properties": [("left_right", 'OVERLAP'), ("linked_time", True), ("extend", True)]}), + ("sequencer.select_side_of_frame", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, + {"properties": [("side", 'LEFT')]}), + ("sequencer.select_side_of_frame", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, + {"properties": [("side", 'RIGHT')]}), + ("sequencer.select_side_of_frame", {"type": 'EQUAL', "value": 'PRESS'}, + {"properties": [("side", 'OVERLAP')]}), + ("sequencer.select_side_of_frame", {"type": 'LEFT_BRACKET', "value": 'PRESS', "shift": True}, + {"properties": [("side", 'LEFT'), ("extend", True)]}), + ("sequencer.select_side_of_frame", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "shift": True}, + {"properties": [("side", 'RIGHT'), ("extend", True)]}), + ("sequencer.select_side_of_frame", {"type": 'EQUAL', "value": 'PRESS', "shift": True}, + {"properties": [("side", 'OVERLAP'), ("extend", True)]}), *_template_items_context_menu("SEQUENCER_MT_context_menu", params.context_menu_event), ]) 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 3698db4cf94..4cb6cefc960 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -1785,17 +1785,17 @@ def km_sequencer(params): ) ), ("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS'}, - {"properties": [("extend", False), ("deselect_all", True), ("linked_handle", False), ("left_right", 'NONE'), ("linked_time", False)]}), + {"properties": [("deselect_all", True)]}), ("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, - {"properties": [("extend", True), ("linked_handle", False), ("left_right", 'NONE'), ("linked_time", False)]}), + {"properties": [("extend", True)]}), ("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True}, - {"properties": [("extend", False), ("linked_handle", True), ("left_right", 'NONE'), ("linked_time", False)]}), + {"properties": [("linked_handle", True)]}), ("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "alt": True}, - {"properties": [("extend", True), ("linked_handle", True), ("left_right", 'NONE'), ("linked_time", False)]}), + {"properties": [("extend", True), ("linked_handle", True)]}), ("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, - {"properties": [("extend", False), ("linked_handle", False), ("left_right", 'MOUSE'), ("linked_time", True)]}), + {"properties": [("side_of_frame", True), ("linked_time", True)]}), ("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, - {"properties": [("extend", True), ("linked_handle", False), ("left_right", 'NONE'), ("linked_time", True)]}), + {"properties": [("extend", True), ("side_of_frame", True), ("linked_time", True)]}), ("sequencer.select_more", {"type": 'UP_ARROW', "value": 'PRESS'}, None), ("sequencer.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS'}, None), ("sequencer.select_linked_pick", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 4f317a97b38..26a150f83ef 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -394,23 +394,6 @@ class SEQUENCER_MT_select_linked(Menu): layout.operator("sequencer.select_more", text="More") -class SEQUENCER_MT_select_side_of_frame(Menu): - bl_label = "Side of Current Frame" - - def draw(self, _context): - layout = self.layout - - props = layout.operator("sequencer.select", text="Overlap") - props.left_right = 'OVERLAP' - props.linked_time = True - props = layout.operator("sequencer.select", text="Left") - props.left_right = 'LEFT' - props.linked_time = True - props = layout.operator("sequencer.select", text="Right") - props.left_right = 'RIGHT' - props.linked_time = True - - class SEQUENCER_MT_select(Menu): bl_label = "Select" @@ -429,7 +412,7 @@ class SEQUENCER_MT_select(Menu): layout.separator() - layout.menu("SEQUENCER_MT_select_side_of_frame") + layout.operator_menu_enum("sequencer.select_side_of_frame", "side", text="Side of Frame...") layout.menu("SEQUENCER_MT_select_handle", text="Handle") layout.menu("SEQUENCER_MT_select_channel", text="Channel") layout.menu("SEQUENCER_MT_select_linked", text="Linked") @@ -2221,7 +2204,6 @@ classes = ( SEQUENCER_MT_view_toggle, SEQUENCER_MT_preview_zoom, SEQUENCER_MT_proxy, - SEQUENCER_MT_select_side_of_frame, SEQUENCER_MT_select_handle, SEQUENCER_MT_select_channel, SEQUENCER_MT_select_linked, |