mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
Skipping collection if it is a string type, added docstrings
This commit is contained in:
parent
133ba71963
commit
2a54a22ecc
1 changed files with 13 additions and 0 deletions
|
|
@ -1,7 +1,14 @@
|
|||
import pyblish.api
|
||||
from avalon.vendor import six
|
||||
|
||||
|
||||
class ValidateSequenceFrames(pyblish.api.InstancePlugin):
|
||||
"""Ensure the sequence of frames is complete
|
||||
|
||||
The files found in the instance are checked against the startFrame and
|
||||
endFrame of the instance. If the first or last file is not
|
||||
corresponding with the first or last frame it is flagged as invalid.
|
||||
"""
|
||||
|
||||
order = pyblish.api.ValidatorOrder
|
||||
label = "Validate Sequence Frames"
|
||||
|
|
@ -10,7 +17,13 @@ class ValidateSequenceFrames(pyblish.api.InstancePlugin):
|
|||
def process(self, instance):
|
||||
|
||||
collection = instance[0]
|
||||
# Hack: Skip the check for `colorbleed.yeticache` from within Maya
|
||||
# When publishing a Yeti cache from Maya the "collection" is a node,
|
||||
# which is a string and it will fail when calling `indexes`
|
||||
if isinstance(collection, six.string_types):
|
||||
return
|
||||
|
||||
self.log.warning(collection)
|
||||
frames = list(collection.indexes)
|
||||
|
||||
assert frames[0] == instance.data["startFrame"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue