Add handling for clips without available ranges

- Added a check for available range in OTIO clips.
- Improved logging to inform when a clip has no available range.
- Adjusted source range collection logic based on availability.
This commit is contained in:
Jakub Jezek 2025-01-30 11:26:46 +01:00
parent 1c943d78e9
commit de82d8b60c
No known key found for this signature in database
GPG key ID: 06DBD609ADF27FD9

View file

@ -80,8 +80,18 @@ class CollectOtioRanges(pyblish.api.InstancePlugin):
if "workfileFrameStart" in instance.data:
self._collect_timeline_ranges(instance, otio_clip)
has_available_range = False
# Traypublisher Simple or Advanced editorial publishing is
# working with otio clips which are having no available range
# because they are not having any media references.
try:
otio_clip.available_range()
has_available_range = True
except otio._otio.CannotComputeAvailableRangeError:
self.log.info("Clip has no available range")
# Collect source ranges if clip has available range
if hasattr(otio_clip, 'available_range') and otio_clip.available_range():
if has_available_range:
self._collect_source_ranges(instance, otio_clip)
# Handle retimed ranges if source duration is available