flame: add colorspace to representation["data"]

This commit is contained in:
Jakub Jezek 2022-01-21 12:46:35 +01:00
parent 279e7d8631
commit dc419ceaed
No known key found for this signature in database
GPG key ID: D8548FBF690B100A

View file

@ -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 = []