From 22769ef460a8e0a9c9972fc6a4fa90d4e7f2d549 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 30 Jan 2025 15:05:32 +0100 Subject: [PATCH] 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. --- .../ayon_core/plugins/publish/collect_otio_frame_ranges.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/ayon_core/plugins/publish/collect_otio_frame_ranges.py b/client/ayon_core/plugins/publish/collect_otio_frame_ranges.py index 34c12a1cf3..8a8af29ca9 100644 --- a/client/ayon_core/plugins/publish/collect_otio_frame_ranges.py +++ b/client/ayon_core/plugins/publish/collect_otio_frame_ranges.py @@ -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