Skip to content

load_audio

ImportAudioLoader

Bases: LoaderPlugin

Import audio.

Source code in client/ayon_harmony/plugins/load/load_audio.py
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
class ImportAudioLoader(load.LoaderPlugin):
    """Import audio."""

    product_types = {"shot", "audio"}
    representations = {"wav"}
    label = "Import Audio"

    def load(self, context, name=None, namespace=None, data=None):
        wav_file = get_representation_path(context["representation"])
        harmony.send(
            {"function": func, "args": [context["product"]["name"], wav_file]}
        )

        product_name = context["product"]["name"]

        return harmony.containerise(
            product_name,
            namespace,
            product_name,
            context,
            self.__class__.__name__
        )

    def update(self, container, context):
        pass

    def remove(self, container):
        pass