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):
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 = {