Algorithms for track objects.
- opentimelineio.algorithms.track_algo.track_trimmed_to_range(in_track, trim_range)¶
Returns a new track that is a copy of the in_track, but with items outside the trim_range removed and items on the ends trimmed to the trim_range.
The track is never expanded, only shortened.
Please note that you could do nearly the same thing non-destructively by just setting the
Track’s source_range but sometimes you want to really cut away the stuff outside and that’s what this function is meant for.
Expands transitions such that neighboring clips are trimmed into regions of overlap.
For example, if your track is:
Clip1, T, Clip2
Clip1', (Clip1_t, T, Clip2_t), Clip2'
Clip1'is the part of
Clip1not in the transition,
Clip1_tis the part inside the transition and so on.
The items used in a transition are encapsulated in tuples.