Capture edge case where all "representations" are tagged for delete

This commit is contained in:
Roy Nieterau 2022-03-29 13:18:04 +02:00
parent a2a77b8a20
commit 6fe6841c99

View file

@ -255,6 +255,12 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
prepared_representations.append(prepared)
if not prepared_representations:
# Even though we check `instance.data["representations"]` earlier
# this could still happen if all representations were tagged with
# "delete" and thus are skipped for integration
raise RuntimeError("No representations prepared to publish.")
# Each instance can also have pre-defined transfers not explicitly
# part of a representation - like texture resources used by a
# .ma representation. Those destination paths are pre-defined, etc.