1 # SPDX-FileCopyrightText: 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
3 # SPDX-License-Identifier: GPL-3.0-or-later
7 from .utils
.doc
import doc_name
, doc_idname
, doc_brief
, doc_description
10 class POWER_SEQUENCER_OT_toggle_selected_mute(bpy
.types
.Operator
):
12 Mute or unmute selected sequences
16 "name": doc_name(__qualname__
),
18 "description": doc_description(__doc__
),
21 {"type": "H", "value": "PRESS"},
22 {"use_unselected": False},
23 "Mute or Unmute Selected Strips",
26 {"type": "H", "value": "PRESS", "alt": True},
27 {"use_unselected": True},
28 "Mute or Unmute Selected Strips",
31 "keymap": "Sequencer",
33 bl_idname
= doc_idname(__qualname__
)
34 bl_label
= doc
["name"]
35 bl_description
= doc_brief(doc
["description"])
36 bl_options
= {"REGISTER", "UNDO"}
38 use_unselected
: bpy
.props
.BoolProperty(
39 name
="Use unselected", description
="Toggle non selected sequences", default
=False
43 def poll(cls
, context
):
44 return context
.selected_sequences
46 def execute(self
, context
):
47 selection
= context
.selected_sequences
49 if self
.use_unselected
:
50 selection
= [s
for s
in context
.sequences
if s
not in selection
]
53 self
.report({"WARNING"}, "No sequences to toggle muted")
56 mute
= not selection
[0].mute