From e7cf7c0fecb8ce73fcf586606af0a817a38ddbd8 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 2 May 2023 21:37:41 +0200 Subject: [PATCH] recognize global file rules switch --- openpype/pipeline/colorspace.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py index ec793cd48b..652304ef33 100644 --- a/openpype/pipeline/colorspace.py +++ b/openpype/pipeline/colorspace.py @@ -357,7 +357,7 @@ def get_imageio_config( "activate_global_color_management", False) if not activate_color_management: - # if global settings are disabled return False because + # if global settings are disabled return empty dict because # it is expected that no colorspace management is needed log.info( "Colorspace management is disabled." @@ -477,6 +477,15 @@ def get_imageio_file_rules(project_name, host_name, project_settings=None): # get file rules from global and host_name frules_global = imageio_global["file_rules"] + activate_global_rules = frules_global.get( + "activate_global_file_rules", False) + + if not activate_global_rules: + log.info( + "Global File Rules are disabled." + ) + return {} + # host is optional, some might not have any settings frules_host = imageio_host.get("file_rules", {})