mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 21:32:15 +01:00
Log frame range mismatch instead of no clear error
This commit is contained in:
parent
aa7bf8c0b9
commit
0db2f87e8e
1 changed files with 9 additions and 3 deletions
|
|
@ -17,12 +17,18 @@ class ValidateSequenceFrames(pyblish.api.InstancePlugin):
|
|||
def process(self, instance):
|
||||
|
||||
collection = instance[0]
|
||||
self.log.info(collection)
|
||||
|
||||
self.log.warning(collection)
|
||||
frames = list(collection.indexes)
|
||||
|
||||
assert frames[0] == instance.data["startFrame"]
|
||||
assert frames[-1] == instance.data["endFrame"]
|
||||
current_range = (frames[0], frames[-1])
|
||||
required_range = (instance.data["startFrame"],
|
||||
instance.data["endFrame"])
|
||||
|
||||
if current_range != required_range:
|
||||
raise ValueError("Invalid frame range: {0} - "
|
||||
"expected: {1}".format(current_range,
|
||||
required_range))
|
||||
|
||||
missing = collection.holes().indexes
|
||||
assert not missing, "Missing frames: %s" % (missing,)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue