Correctly fail extraction if user "interrupts" the extraction

This commit is contained in:
Roy Nieterau 2022-02-01 22:28:38 +01:00
parent dd92fe1e4e
commit 3804980a4f

View file

@ -28,6 +28,16 @@ class ExtractAss(openpype.api.Extractor):
render_rop(ropnode)
# Unfortunately user interrupting the extraction does not raise an
# error and thus still continues to the integrator. To capture that
# we make sure all files exist
files = instance.data["frames"]
missing = [fname for fname in files
if not os.path.exists(os.path.join(staging_dir, fname))]
if missing:
raise RuntimeError("Failed to complete Arnold ass extraction. "
"Missing output files: {}".format(missing))
if "representations" not in instance.data:
instance.data["representations"] = []
@ -37,7 +47,7 @@ class ExtractAss(openpype.api.Extractor):
representation = {
'name': 'ass',
'ext': ext,
"files": instance.data["frames"],
"files": files,
"stagingDir": staging_dir,
"frameStart": instance.data["frameStart"],
"frameEnd": instance.data["frameEnd"],