diff --git a/openpype/hosts/nuke/plugins/publish/extract_render_local.py b/openpype/hosts/nuke/plugins/publish/extract_render_local.py index 7f487a65ac..c5e8e0e8c8 100644 --- a/openpype/hosts/nuke/plugins/publish/extract_render_local.py +++ b/openpype/hosts/nuke/plugins/publish/extract_render_local.py @@ -97,9 +97,8 @@ class NukeRenderLocal(publish.ExtractorColormanaged): # inject colorspace data self.set_representation_colorspace( - repre, - config_data, - file_rules + repre, instance.context, + config_data, file_rules ) instance.data["representations"].append(repre) diff --git a/openpype/pipeline/publish/publish_plugins.py b/openpype/pipeline/publish/publish_plugins.py index 6f2633eaed..62ac1fc5f0 100644 --- a/openpype/pipeline/publish/publish_plugins.py +++ b/openpype/pipeline/publish/publish_plugins.py @@ -321,10 +321,8 @@ class ExtractorColormanaged(Extractor): return config_data, file_rules def set_representation_colorspace( - self, representation, - project_settings, - config_data, - file_rules + self, representation, context, + config_data, file_rules ): if not config_data: @@ -332,15 +330,19 @@ class ExtractorColormanaged(Extractor): self.log.warning("No colorspace management was defined") return - self.log.info("Config path is : `{}`".format( + self.log.info("Config data is : `{}`".format( config_data)) - # check extension ext = representation["ext"] + # check extension self.log.debug("__ ext: `{}`".format(ext)) if ext.lower() not in self.allowed_ext: return + project_name = context.data["projectName"] + host_name = context.data["hostName"] + project_settings = context.data["project_settings"] + # get one filename filename = representation["files"] if isinstance(filename, list): @@ -351,7 +353,7 @@ class ExtractorColormanaged(Extractor): # get matching colorspace from rules colorspace = get_imagio_colorspace_from_filepath( - filename, + filename, host_name, project_name, config_data=config_data, file_rules=file_rules, project_settings=project_settings diff --git a/openpype/plugins/publish/extract_colorspace_data.py b/openpype/plugins/publish/extract_colorspace_data.py index c71456b4f9..40ba0620c6 100644 --- a/openpype/plugins/publish/extract_colorspace_data.py +++ b/openpype/plugins/publish/extract_colorspace_data.py @@ -44,7 +44,6 @@ class ExtractColorspaceData(publish.ExtractorColormanaged): continue self.set_representation_colorspace( - representation, - config_data, - file_rules + representation, context, + config_data, file_rules )