From dc419ceaed338fe8c45f5e32d21386a4eabaa9c8 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 21 Jan 2022 12:46:35 +0100 Subject: [PATCH] flame: add colorspace to representation["data"] --- .../publish/extract_subset_resources.py | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/flame/plugins/publish/extract_subset_resources.py b/openpype/hosts/flame/plugins/publish/extract_subset_resources.py index a0345d5175..a80366b9e4 100644 --- a/openpype/hosts/flame/plugins/publish/extract_subset_resources.py +++ b/openpype/hosts/flame/plugins/publish/extract_subset_resources.py @@ -47,6 +47,16 @@ class ExtractSubsetResources(openpype.api.Extractor): export_presets_mapping = {} def process(self, instance): + try: + self._process(instance) + # bring ui back + self.hide_ui_on_process = False + except Exception as msg: + self.log.error(msg) + # bring ui back + self.hide_ui_on_process = False + + def _process(self, instance): if ( self.keep_original_representation @@ -140,7 +150,9 @@ class ExtractSubsetResources(openpype.api.Extractor): "ext": extension, "stagingDir": export_dir_path, "tags": repre_tags, - "colorspace": color_out + "data": { + "colorspace": color_out + } } # collect all available content of export dir @@ -205,10 +217,23 @@ class ExtractSubsetResources(openpype.api.Extractor): # exclude single files which are having extension # the same as input ext attr if ( + # only one file in list len(files_list) == 1 + # file is having extension as input and ext in os.path.splitext(files_list[0])[-1] ): return None, None + elif ( + # more then one file in list + len(files_list) >= 1 + # extension is correct + and ext in os.path.splitext(files_list[0])[-1] + # test file exists + and os.path.exists( + os.path.join(stage_dir, files_list[0]) + ) + ): + return None, None new_stage_dir = None new_files_list = []