From e89053954041d3b74088e3f7202fc2fda9a9a6c1 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 9 Dec 2025 17:29:01 +0100 Subject: [PATCH] making sure rules are activated and overrides colorspace even it is set already --- client/ayon_core/pipeline/colorspace.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/client/ayon_core/pipeline/colorspace.py b/client/ayon_core/pipeline/colorspace.py index 7a4d9dda50..6ccff2ef66 100644 --- a/client/ayon_core/pipeline/colorspace.py +++ b/client/ayon_core/pipeline/colorspace.py @@ -1299,9 +1299,9 @@ def set_colorspace_data_to_representation( if isinstance(filename, list): filename = filename[0] - # get matching colorspace from rules - if colorspace is None: - colorspace = get_imageio_file_rules_colorspace_from_filepath( + colorspace_from_rules = None + if file_rules: + colorspace_from_rules = get_imageio_file_rules_colorspace_from_filepath( filename, host_name, project_name, @@ -1310,6 +1310,10 @@ def set_colorspace_data_to_representation( project_settings=project_settings ) + # get matching colorspace from rules + if colorspace_from_rules: + colorspace = colorspace_from_rules + # infuse data to representation if colorspace: colorspace_data = {