mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Address feedback from PR.
This commit is contained in:
parent
133bb32c81
commit
8dc243f2fe
2 changed files with 18 additions and 17 deletions
|
|
@ -430,10 +430,10 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end):
|
|||
* abs(time_scalar)
|
||||
)
|
||||
|
||||
# duration 1 frame -> freeze frame -> end = start + 0
|
||||
offset_duration -= 1
|
||||
# negative duration = frozen frame
|
||||
offset_duration = max(0, offset_duration)
|
||||
# Offset duration by 1 for media out frame
|
||||
# - only if duration is not single frame (start frame != end frame)
|
||||
if offset_duration > 0:
|
||||
offset_duration -= 1
|
||||
media_out_trimmed = media_in_trimmed + offset_duration
|
||||
|
||||
media_in = available_range.start_time.value
|
||||
|
|
@ -460,17 +460,18 @@ def get_media_range_with_retimes(otio_clip, handle_start, handle_end):
|
|||
else:
|
||||
new_idx = round(idx + tw["lookup"][idx])
|
||||
|
||||
if not 0 <= new_idx < len(frame_range):
|
||||
# TODO: implementing this would need to actually have
|
||||
# retiming engine resolve process within AYON,
|
||||
# resolving wraps as curves, then projecting
|
||||
# those into the previous media_range.
|
||||
raise NotImplementedError(
|
||||
"Unsupported consecutive timewarps "
|
||||
"(out of computed range)"
|
||||
)
|
||||
if 0 <= new_idx < len(frame_range):
|
||||
frame_range[idx] = frame_range[new_idx]
|
||||
continue
|
||||
|
||||
frame_range[idx] = frame_range[new_idx]
|
||||
# TODO: implementing this would need to actually have
|
||||
# retiming engine resolve process within AYON,
|
||||
# resolving wraps as curves, then projecting
|
||||
# those into the previous media_range.
|
||||
raise NotImplementedError(
|
||||
"Unsupported consecutive timewarps "
|
||||
"(out of computed range)"
|
||||
)
|
||||
|
||||
# adjust range if needed
|
||||
media_in_trimmed = max(min(frame_range), media_in)
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ class CollectOtioSubsetResources(
|
|||
repre = self._create_representation(
|
||||
frame_start, frame_end, collection=collection)
|
||||
else:
|
||||
filename, = tuple(collection)
|
||||
filename = tuple(collection)[0]
|
||||
self.log.debug(filename)
|
||||
|
||||
# TODO: discuss this, it erases frame number.
|
||||
|
|
@ -200,8 +200,8 @@ class CollectOtioSubsetResources(
|
|||
and "review" in instance.data["families"]
|
||||
):
|
||||
review_repre = self._create_representation(
|
||||
frame_start, frame_end, collection=collection,
|
||||
delete=True, review=True)
|
||||
frame_start, frame_end, collection=collection,
|
||||
delete=True, review=True)
|
||||
|
||||
else:
|
||||
_trim = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue