Keymap: add sequencer box select with handles
Use Ctrl-B, include in menu, rename property to match graph editor.
This commit is contained in:
@@ -2486,6 +2486,8 @@ def km_sequencer(params):
|
||||
("sequencer.select_box", {"type": params.select_tweak, "value": 'ANY', "ctrl": True},
|
||||
{"properties": [("tweak", True), ("mode", 'SUB')]}),
|
||||
("sequencer.select_box", {"type": 'B', "value": 'PRESS'}, None),
|
||||
("sequencer.select_box", {"type": 'B', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("include_handles", True)]}),
|
||||
("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'}),
|
||||
|
||||
@@ -404,6 +404,8 @@ class SEQUENCER_MT_select(Menu):
|
||||
layout.separator()
|
||||
|
||||
layout.operator("sequencer.select_box", text="Box Select")
|
||||
props = layout.operator("sequencer.select_box", text="Box Select (Handles)")
|
||||
props.include_handles = True
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
||||
@@ -1026,7 +1026,7 @@ static int sequencer_box_select_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
const eSelectOp sel_op = RNA_enum_get(op->ptr, "mode");
|
||||
const bool handles = RNA_boolean_get(op->ptr, "handles");
|
||||
const bool handles = RNA_boolean_get(op->ptr, "include_handles");
|
||||
const bool select = (sel_op != SEL_OP_SUB);
|
||||
|
||||
if (SEL_OP_USE_PRE_DESELECT(sel_op)) {
|
||||
@@ -1135,7 +1135,8 @@ void SEQUENCER_OT_select_box(wmOperatorType *ot)
|
||||
prop = RNA_def_boolean(
|
||||
ot->srna, "tweak", 0, "Tweak", "Operator has been activated using a tweak event");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
prop = RNA_def_boolean(ot->srna, "handles", 0, "Select Handles", "Select the strips' handles");
|
||||
prop = RNA_def_boolean(
|
||||
ot->srna, "include_handles", 0, "Select Handles", "Select the strips' handles");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user