mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
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.
This commit is contained in:
parent
5b63541bf6
commit
539be6c527
1 changed files with 6 additions and 1 deletions
|
|
@ -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 == "<USE_DISPLAY_NAME>":
|
||||
colorspace = display
|
||||
|
||||
return colorspace
|
||||
|
||||
|
||||
def _get_ocio_config_colorspaces(config_path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue