Skip to content

ayon_syncsketch

SyncsketchAddon

Bases: AYONAddon, IPluginPaths

Source code in client/ayon_syncsketch/addon.py
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
44
45
class SyncsketchAddon(AYONAddon, IPluginPaths):
    name = "syncsketch"
    version = __version__

    def get_syncsketch_config(self, project_name):
        """ Returns the active SyncSketch config for the current project """
        server_config = config.get_syncsketch_project_config(
            project_name, self.version
        )

        # resolve secrets into the server config
        config.merge_resolved_secrets(server_config)

        return server_config

    def get_plugin_paths(self):
        return {
            "publish": [
                os.path.join(SYNCSKETCH_ADDON_ROOT, "plugins", "publish")
            ]
        }

    def get_publish_plugin_paths(self, host_name):
        """Receive publish plugin paths.

        Give addons ability to add publish plugin paths based on host name.

        Notes:
           Default implementation uses 'get_plugin_paths' and always return
               all publish plugin paths.

        Args:
           host_name (str): For which host are the plugins meant.
        """
        return self._get_plugin_paths_by_type("publish")

get_publish_plugin_paths(host_name)

Receive publish plugin paths.

Give addons ability to add publish plugin paths based on host name.

Notes

Default implementation uses 'get_plugin_paths' and always return all publish plugin paths.

Parameters:

Name Type Description Default
host_name str

For which host are the plugins meant.

required
Source code in client/ayon_syncsketch/addon.py
33
34
35
36
37
38
39
40
41
42
43
44
45
def get_publish_plugin_paths(self, host_name):
    """Receive publish plugin paths.

    Give addons ability to add publish plugin paths based on host name.

    Notes:
       Default implementation uses 'get_plugin_paths' and always return
           all publish plugin paths.

    Args:
       host_name (str): For which host are the plugins meant.
    """
    return self._get_plugin_paths_by_type("publish")

get_syncsketch_config(project_name)

Returns the active SyncSketch config for the current project

Source code in client/ayon_syncsketch/addon.py
15
16
17
18
19
20
21
22
23
24
def get_syncsketch_config(self, project_name):
    """ Returns the active SyncSketch config for the current project """
    server_config = config.get_syncsketch_project_config(
        project_name, self.version
    )

    # resolve secrets into the server config
    config.merge_resolved_secrets(server_config)

    return server_config