Skip to content

Commit

Permalink
Fix source_range accuracy.
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-ynput committed Jan 15, 2025
1 parent a90b639 commit 61aeef5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/ayon_hiero/api/otio/hiero_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,15 @@ def create_otio_clip(track_item):

media_reference = create_otio_reference(clip)
available_start = media_reference.available_range.start_time
conformed_start_value = available_start.value_rescaled_to(fps)
source_in_offset = otio.opentime.RationalTime(
source_in,
available_start.rate
)
src_in = available_start + source_in_offset
conformed_src_in = src_in.rescaled_to(fps)

source_range = create_otio_time_range(
conformed_start_value + source_in,
conformed_src_in.value, # no rounding to preserve accuracy
duration,
fps
)
Expand Down

0 comments on commit 61aeef5

Please sign in to comment.