mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Update openpype/hosts/traypublisher/plugins/publish/validate_frame_ranges.py
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
parent
cdabfbe6f9
commit
ef2284e507
1 changed files with 6 additions and 5 deletions
|
|
@ -43,18 +43,19 @@ class ValidateFrameRange(OptionalPyblishPluginMixin,
|
|||
handle_end = asset_data["handleEnd"]
|
||||
duration = (frame_end - frame_start + 1) + handle_start + handle_end
|
||||
|
||||
repre = instance.data.get("representations", [None])
|
||||
if not repre:
|
||||
repres = instance.data.get("representations")
|
||||
if not repres:
|
||||
self.log.info("No representations, skipping.")
|
||||
return
|
||||
|
||||
ext = repre[0]['ext'].replace(".", '')
|
||||
|
||||
first_repre = repres[0]
|
||||
ext = first_repre['ext'].replace(".", '')
|
||||
|
||||
if not ext or ext.lower() not in self.check_extensions:
|
||||
self.log.warning("Cannot check for extension {}".format(ext))
|
||||
return
|
||||
|
||||
files = instance.data.get("representations", [None])[0]["files"]
|
||||
files = first_repre["files"]
|
||||
if isinstance(files, str):
|
||||
files = [files]
|
||||
frames = len(files)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue