1 # SPDX-License-Identifier: GPL-3.0-or-later
2 # Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
5 from .utils
.doc
import doc_name
, doc_idname
, doc_brief
, doc_description
8 class POWER_SEQUENCER_OT_select_all_left_or_right(bpy
.types
.Operator
):
10 *Brief* Selects all strips left or right of the time cursor
14 "name": doc_name(__qualname__
),
16 "description": doc_description(__doc__
),
19 {"type": "Q", "value": "PRESS", "shift": True},
21 "Select all strips to the LEFT of the time cursor",
24 {"type": "E", "value": "PRESS", "shift": True},
26 "Select all strips to the right of the time cursor",
29 "keymap": "Sequencer",
31 bl_idname
= doc_idname(__qualname__
)
32 bl_label
= doc
["name"]
33 bl_description
= doc_brief(doc
["description"])
34 bl_options
= {"REGISTER", "UNDO"}
36 side
: bpy
.props
.EnumProperty(
38 description
=("Side to select"),
40 ("LEFT", "Left", "Move strips back in time, to the left"),
41 ("RIGHT", "Right", "Move strips forward in time, to the right"),
47 def poll(cls
, context
):
48 return context
.sequences
50 def execute(self
, context
):
51 if self
.side
== "LEFT":
52 for s
in context
.sequences
:
53 s
.select
= s
.frame_final_end
< context
.scene
.frame_current
55 for s
in context
.sequences
:
56 s
.select
= s
.frame_final_start
> context
.scene
.frame_current