mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
check if all frames exist before IFD extraction
This commit is contained in:
parent
389b6100ac
commit
82416b2482
1 changed files with 12 additions and 0 deletions
|
|
@ -29,6 +29,18 @@ class ExtractMantraIFD(publish.Extractor):
|
|||
render_rop(ropnode)
|
||||
|
||||
files = instance.data["frames"]
|
||||
# Check if all frames exists.
|
||||
# Frames can be nonexistent if user cancels the render.
|
||||
missing_frames = [
|
||||
frame
|
||||
for frame in instance.data["frames"]
|
||||
if not os.path.exists(
|
||||
os.path.normpath(os.path.join(staging_dir, frame)))
|
||||
]
|
||||
if missing_frames:
|
||||
raise RuntimeError("Failed to complete Mantra ifd extraction. "
|
||||
"Missing output files: {}".format(
|
||||
missing_frames))
|
||||
|
||||
if "representations" not in instance.data:
|
||||
instance.data["representations"] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue