Add OCIO path function.

This commit is contained in:
Allan Ihsan 2022-07-28 12:33:29 +03:00
parent 7adb845386
commit 86070835b9

View file

@ -534,3 +534,25 @@ class ExtractModelRenderSets(ExtractLook):
self.scene_type = self.scene_type_prefix + self.scene_type
return typ
def get_ocio_config_path(profile_folder):
"""Path to OpenPype vendorized OCIO.
Vendorized OCIO config file path is grabbed from the specific path
hierarchy specified below.
"{OPENPYPE_ROOT}/vendor/OpenColorIO-Configs/{profile_folder}/config.ocio"
Args:
profile_folder (str): Name of folder to grab config file from.
Returns:
str: Path to vendorized config file.
"""
return os.path.join(
os.environ["OPENPYPE_ROOT"],
"vendor",
"OpenColorIO-Configs",
profile_folder,
"config.ocio"
)