From 2228037656b8eeaa400fcaab1329c6416dbc050f Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 3 Jul 2025 09:57:20 +0200 Subject: [PATCH] Adds target color space data extraction to OIIO transcode processor. - Introduces extraction of `targetOCIOColorspace`, `targetOCIODisplay`, and `targetOCIOView` from instance data. - Removes redundant assignment of `target_colorspace`, `target_display`, and `target_view`. --- client/ayon_core/plugins/publish/extract_color_transcode.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/plugins/publish/extract_color_transcode.py b/client/ayon_core/plugins/publish/extract_color_transcode.py index ef718b8d02..7083d5094c 100644 --- a/client/ayon_core/plugins/publish/extract_color_transcode.py +++ b/client/ayon_core/plugins/publish/extract_color_transcode.py @@ -85,6 +85,11 @@ class ExtractOIIOTranscode(publish.Extractor): new_representations = [] repres = instance.data["representations"] for idx, repre in enumerate(list(repres)): + # target space, display and view might be defined upstream + target_colorspace = instance.data.get("targetOCIOColorspace") + target_display = instance.data.get("targetOCIODisplay") + target_view = instance.data.get("targetOCIOView") + self.log.debug("repre ({}): `{}`".format(idx + 1, repre["name"])) if not self._repre_is_valid(repre): continue @@ -126,7 +131,6 @@ class ExtractOIIOTranscode(publish.Extractor): transcoding_type = output_def["transcoding_type"] - target_colorspace = target_view = target_display = None # NOTE: we use colorspace_data as the fallback values for # the target colorspace. if transcoding_type == "colorspace":