making sure rules are activated

and overrides colorspace even it is set already
This commit is contained in:
Jakub Jezek 2025-12-09 17:29:01 +01:00
parent 8103135efd
commit e890539540
No known key found for this signature in database
GPG key ID: 06DBD609ADF27FD9

View file

@ -1299,9 +1299,9 @@ def set_colorspace_data_to_representation(
if isinstance(filename, list): if isinstance(filename, list):
filename = filename[0] filename = filename[0]
# get matching colorspace from rules colorspace_from_rules = None
if colorspace is None: if file_rules:
colorspace = get_imageio_file_rules_colorspace_from_filepath( colorspace_from_rules = get_imageio_file_rules_colorspace_from_filepath(
filename, filename,
host_name, host_name,
project_name, project_name,
@ -1310,6 +1310,10 @@ def set_colorspace_data_to_representation(
project_settings=project_settings project_settings=project_settings
) )
# get matching colorspace from rules
if colorspace_from_rules:
colorspace = colorspace_from_rules
# infuse data to representation # infuse data to representation
if colorspace: if colorspace:
colorspace_data = { colorspace_data = {