Skip to content

ayon_marvelousdesigner

Marvelous Designer integration package for AYON.

This package provides integration with Marvelous Designer, including the addon class and host directory configuration.

MarvelousDesignerAddon

Bases: AYONAddon, IHostAddon

Addon class for Marvelous Designer integration with AYON.

This addon provides host integration capabilities for Marvelous Designer, including launch hooks, environment setup, and workfile extensions.

Source code in client/ayon_marvelousdesigner/addon.py
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
46
47
48
49
50
class MarvelousDesignerAddon(AYONAddon, IHostAddon):
    """Addon class for Marvelous Designer integration with AYON.

    This addon provides host integration capabilities for Marvelous Designer,
    including launch hooks, environment setup, and workfile extensions.
    """
    name = "marvelous_designer"
    version = __version__
    host_name = "marvelousdesigner"

    def add_implementation_envs(self, env: dict, _app: object) -> None:  # noqa: PLR6301
        """Add environment variables specific to Marvelous Designer host."""
        env.pop("QT_AUTO_SCREEN_SCALE_FACTOR", None)

    def get_launch_hook_paths(self, app: object) -> list[str]:
        """Get paths to launch hook directories for Marvelous Designer.

        Args:
            app: Application object containing host information.

        Returns:
            List of paths to hook directories, or empty list if not applicable.
        """
        if app.host_name != self.host_name:
            return []
        return [
            os.path.join(MARVELOUS_DESIGNER_HOST_DIR, "hooks")
        ]

    def get_workfile_extensions(self) -> list[str]:  # noqa: PLR6301
        """Get supported workfile extensions for Marvelous Designer.

        Returns:
            List of supported workfile extensions.
        """
        return [".zprj"]

add_implementation_envs(env, _app)

Add environment variables specific to Marvelous Designer host.

Source code in client/ayon_marvelousdesigner/addon.py
25
26
27
def add_implementation_envs(self, env: dict, _app: object) -> None:  # noqa: PLR6301
    """Add environment variables specific to Marvelous Designer host."""
    env.pop("QT_AUTO_SCREEN_SCALE_FACTOR", None)

get_launch_hook_paths(app)

Get paths to launch hook directories for Marvelous Designer.

Parameters:

Name Type Description Default
app object

Application object containing host information.

required

Returns:

Type Description
list[str]

List of paths to hook directories, or empty list if not applicable.

Source code in client/ayon_marvelousdesigner/addon.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
def get_launch_hook_paths(self, app: object) -> list[str]:
    """Get paths to launch hook directories for Marvelous Designer.

    Args:
        app: Application object containing host information.

    Returns:
        List of paths to hook directories, or empty list if not applicable.
    """
    if app.host_name != self.host_name:
        return []
    return [
        os.path.join(MARVELOUS_DESIGNER_HOST_DIR, "hooks")
    ]

get_workfile_extensions()

Get supported workfile extensions for Marvelous Designer.

Returns:

Type Description
list[str]

List of supported workfile extensions.

Source code in client/ayon_marvelousdesigner/addon.py
44
45
46
47
48
49
50
def get_workfile_extensions(self) -> list[str]:  # noqa: PLR6301
    """Get supported workfile extensions for Marvelous Designer.

    Returns:
        List of supported workfile extensions.
    """
    return [".zprj"]