mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +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"]
|
handle_end = asset_data["handleEnd"]
|
||||||
duration = (frame_end - frame_start + 1) + handle_start + handle_end
|
duration = (frame_end - frame_start + 1) + handle_start + handle_end
|
||||||
|
|
||||||
repre = instance.data.get("representations", [None])
|
repres = instance.data.get("representations")
|
||||||
if not repre:
|
if not repres:
|
||||||
self.log.info("No representations, skipping.")
|
self.log.info("No representations, skipping.")
|
||||||
return
|
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:
|
if not ext or ext.lower() not in self.check_extensions:
|
||||||
self.log.warning("Cannot check for extension {}".format(ext))
|
self.log.warning("Cannot check for extension {}".format(ext))
|
||||||
return
|
return
|
||||||
|
|
||||||
files = instance.data.get("representations", [None])[0]["files"]
|
files = first_repre["files"]
|
||||||
if isinstance(files, str):
|
if isinstance(files, str):
|
||||||
files = [files]
|
files = [files]
|
||||||
frames = len(files)
|
frames = len(files)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue