Refactor frame range handling for clarity

- Improved readability by breaking long lines into multiple lines.
- Removed unused variable related to shot duration from source.
- Cleaned up code structure in the frame range collection process.
This commit is contained in:
Jakub Jezek 2025-01-30 15:05:32 +01:00
parent de82d8b60c
commit 22769ef460
No known key found for this signature in database
GPG key ID: 06DBD609ADF27FD9

View file

@ -104,11 +104,13 @@ class CollectOtioRanges(pyblish.api.InstancePlugin):
# Get timeline ranges
otio_tl_range = otio_clip.range_in_parent()
otio_tl_range_handles = otio_range_with_handles(otio_tl_range, instance)
otio_tl_range_handles = otio_range_with_handles(
otio_tl_range, instance)
# Convert to frames
tl_start, tl_end = otio_range_to_frame_range(otio_tl_range)
tl_start_h, tl_end_h = otio_range_to_frame_range(otio_tl_range_handles)
tl_start_h, tl_end_h = otio_range_to_frame_range(
otio_tl_range_handles)
frame_start = workfile_start
frame_end = frame_start + otio_tl_range.duration.to_frames() - 1
@ -175,7 +177,6 @@ class CollectOtioRanges(pyblish.api.InstancePlugin):
def _collect_retimed_ranges(self, instance, otio_clip):
"""Handle retimed clip frame ranges."""
workfile_source_duration = instance.data.get("shotDurationFromSource")
frame_start = instance.data["frameStart"]
# Handle retimed clip frame range