Skip to content

ayon_aftereffects

AfterEffectsAddon

Bases: AYONAddon, IHostAddon

Source code in client/ayon_aftereffects/addon.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class AfterEffectsAddon(AYONAddon, IHostAddon):
    name = "aftereffects"
    version = __version__
    host_name = "aftereffects"

    def add_implementation_envs(self, env, _app):
        """Modify environments to contain all required for implementation."""
        defaults = {
            "AYON_LOG_NO_COLORS": "1",
            "WEBSOCKET_URL": "ws://localhost:8097/ws/"
        }
        for key, value in defaults.items():
            if not env.get(key):
                env[key] = value

    def get_workfile_extensions(self):
        return [".aep"]

    def get_launch_hook_paths(self, app):
        if app.host_name != self.host_name:
            return []
        return [
            os.path.join(AFTEREFFECTS_ADDON_ROOT, "hooks")
        ]

    def publish_in_test(self, log, close_plugin_name=None):
        """Runs publish in an opened host with a context.

        Close Python process at the end.
        """

        from ayon_aftereffects.api.lib import publish_in_test

        publish_in_test(log, close_plugin_name)

add_implementation_envs(env, _app)

Modify environments to contain all required for implementation.

Source code in client/ayon_aftereffects/addon.py
15
16
17
18
19
20
21
22
23
def add_implementation_envs(self, env, _app):
    """Modify environments to contain all required for implementation."""
    defaults = {
        "AYON_LOG_NO_COLORS": "1",
        "WEBSOCKET_URL": "ws://localhost:8097/ws/"
    }
    for key, value in defaults.items():
        if not env.get(key):
            env[key] = value

publish_in_test(log, close_plugin_name=None)

Runs publish in an opened host with a context.

Close Python process at the end.

Source code in client/ayon_aftereffects/addon.py
35
36
37
38
39
40
41
42
43
def publish_in_test(self, log, close_plugin_name=None):
    """Runs publish in an opened host with a context.

    Close Python process at the end.
    """

    from ayon_aftereffects.api.lib import publish_in_test

    publish_in_test(log, close_plugin_name)