Skip to content

ayon_ocio

OCIODistAddon

Bases: AYONAddon

OCIO addon to deploy default OCIO configs.

OCIO zip is on server and can be downloaded from there. That won't be part of client build as it's quite big dependency that doesn't need update on each client build update.

Source code in client/ayon_ocio/__init__.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
class OCIODistAddon(AYONAddon):
    """OCIO addon to deploy default OCIO configs.

    OCIO zip is on server and can be downloaded from there. That won't be part
    of client build as it's quite big dependency that doesn't need update on
    each client build update.
    """

    name = "ayon_ocio"
    version = __version__

    def get_global_environments(self):
        return {
            "BUILTIN_OCIO_ROOT": self.get_ocio_config_dir()
        }

    @classmethod
    def get_ocio_config_dir(cls):
        """Get OCIO config dir and download then if are not available.

        Returns:
            str: Path to OCIO config directory.
        """

        return os.path.join(
            CONFIG_ROOT,
            "OpenColorIOConfigs"
        )

get_ocio_config_dir() classmethod

Get OCIO config dir and download then if are not available.

Returns:

Name Type Description
str

Path to OCIO config directory.

Source code in client/ayon_ocio/__init__.py
27
28
29
30
31
32
33
34
35
36
37
38
@classmethod
def get_ocio_config_dir(cls):
    """Get OCIO config dir and download then if are not available.

    Returns:
        str: Path to OCIO config directory.
    """

    return os.path.join(
        CONFIG_ROOT,
        "OpenColorIOConfigs"
    )