From 539be6c5270dbdfe739df9d2ccda8b59cc7b7340 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 9 May 2025 17:51:51 +0200 Subject: [PATCH] Handles OCIO shared view token The OCIO config can return a special token "" as the colorspace name for a display view. This commit implements handling for this token, replacing it with the display name if found. --- client/ayon_core/pipeline/colorspace.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/colorspace.py b/client/ayon_core/pipeline/colorspace.py index 8c4f97ab1c..79aea391eb 100644 --- a/client/ayon_core/pipeline/colorspace.py +++ b/client/ayon_core/pipeline/colorspace.py @@ -1403,7 +1403,12 @@ def _get_display_view_colorspace_name(config_path, display, view): """ config = _get_ocio_config(config_path) - return config.getDisplayViewColorSpaceName(display, view) + colorspace = config.getDisplayViewColorSpaceName(display, view) + # Special token. See https://opencolorio.readthedocs.io/en/latest/guides/authoring/authoring.html#shared-views # noqa + if colorspace == "": + colorspace = display + + return colorspace def _get_ocio_config_colorspaces(config_path):