Welcome to mirror list, hosted at ThFree Co, Russian Federation.

__init__.py « operators « power_sequencer - git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 57dbe2bbfa041cc5427fb6065b41b27d3230c4df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import importlib
import os


def get_operator_classes():
    """Returns the list of operators in the add-on"""
    this_file = os.path.dirname(__file__)
    module_files = [
        f for f in os.listdir(this_file) if f.endswith(".py") and not f.startswith("__init__")
    ]
    module_paths = ["." + os.path.splitext(f)[0] for f in module_files]
    classes = []
    for path in module_paths:
        module = importlib.import_module(path, package=__package__)
        operator_names = [entry for entry in dir(module) if entry.startswith("POWER_SEQUENCER_OT")]
        classes.extend([getattr(module, name) for name in operator_names])
    return classes


doc = {
    "sequencer.refresh_all": {
        "name": "Refresh All",
        "description": "",
        "shortcuts": [({"type": "R", "value": "PRESS", "shift": True}, {}, "Refresh All")],
        "demo": "",
        "keymap": "Sequencer",
    }
}