[Bf-blender-cvs] [74fa600ede9] master: Sequencer: split select side of frame out of the select operator
Campbell Barton
noreply at git.blender.org
Fri Jun 5 14:14:50 CEST 2020
Commit: 74fa600ede93852e031c73322a43e807d1b9daf0
Author: Campbell Barton
Date: Fri Jun 5 22:04:59 2020 +1000
Branches: master
https://developer.blender.org/rB74fa600ede93852e031c73322a43e807d1b9daf0
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.
===================================================================
M release/scripts/presets/keyconfig/keymap_data/blender_default.py
M release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
M release/scripts/startup/bl_ui/space_sequencer.py
M source/blender/editors/space_sequencer/sequencer_intern.h
M source/blender/editors/space_sequencer/sequencer_ops.c
M source/blender/editors/space_sequencer/sequencer_select.c
===================================================================
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,
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h
index 0e7e691c748..25f3d087cb2 100644
--- a/source/blender/editors/space_sequencer/sequencer_intern.h
+++ b/source/blender/editors/space_sequencer/sequencer_intern.h
@@ -158,6 +158,7 @@ void SEQUENCER_OT_view_all_preview(struct wmOperatorType *ot);
/* sequencer_select.c */
void SEQUENCER_OT_select_all(struct wmOperatorType *ot);
void SEQUENCER_OT_select(struct wmOperatorType *ot);
+void SEQUENCER_OT_select_side_of_frame(struct wmOperatorType *ot);
void SEQUENCER_OT_select_more(struct wmOperatorType *ot);
void SEQUENCER_OT_select_less(struct wmOperatorType *ot);
void SEQUENCER_OT_select_linked(struct wmOperatorType *ot);
@@ -186,14 +187,6 @@ enum {
SEQ_UNSELECTED,
};
-enum {
- SEQ_SELECT_LR_NONE = 0,
- SEQ_SELECT_LR_MOUSE,
- SEQ_SELECT_LR_LEFT,
- SEQ_SELECT_LR_RIGHT,
- SEQ_SELECT_LR_OVERLAP,
-};
-
/* Defines used internally. */
#define SCE_MARKERS 0 /* XXX - dummy */
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c
index ac00838a079..4fe1c953c74 100644
--- a/source/blender/editors/space_sequencer/sequencer_ops.c
+++ b/source/blender/editors/space_sequencer/sequencer_ops.c
@@ -99,6 +99,7 @@ void sequencer_operatortypes(void)
WM_operatorty
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list