mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
fix the bug of failing to extract look when UDIM formats used in AiImage
This commit is contained in:
parent
82c4f19979
commit
dc73bbdb13
1 changed files with 13 additions and 10 deletions
|
|
@ -430,22 +430,25 @@ class ExtractLook(openpype.api.Extractor):
|
|||
color_space = "Raw"
|
||||
else:
|
||||
# get all the resolved files in Maya File Path Editor
|
||||
src = files_metadata.get(source)
|
||||
if src:
|
||||
if files_metadata[source]["color_space"] == "Raw":
|
||||
metadata = files_metadata.get(source)
|
||||
if metadata:
|
||||
metadata = files_metadata[source]
|
||||
if metadata["color_space"] == "Raw":
|
||||
# set color space to raw if we linearized it
|
||||
color_space = "Raw"
|
||||
else:
|
||||
# if the files are unresolved from `source`
|
||||
# assume color space from the first file of
|
||||
# the resource
|
||||
first_file = next(iter(resource.get("files", [])), None)
|
||||
if not first_file:
|
||||
continue
|
||||
filepath = os.path.normpath(first_file)
|
||||
# if the files are unresolved
|
||||
if files_metadata[filepath]["color_space"] == "Raw":
|
||||
# set color space to raw if we linearized it
|
||||
metadata = files_metadata.get(source)
|
||||
if not metadata:
|
||||
first_file = next(iter(resource.get("files", [])), None)
|
||||
if not first_file:
|
||||
continue
|
||||
first_filepath = os.path.normpath(first_file)
|
||||
metadata = files_metadata[first_filepath]
|
||||
if metadata["color_space"] == "Raw":
|
||||
# set color space to raw if we linearized it
|
||||
color_space = "Raw"
|
||||
# Remap file node filename to destination
|
||||
remap[color_space_attr] = color_space
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue