Skip to content

Commit d213805

Browse files
authored
Fix #1347 documentation on time ranges (#1780)
* Fix #1347 documentation on time ranges --------- Signed-off-by: Spencer Magnusson <semagnum@gmail.com>
1 parent 42158eb commit d213805

File tree

1 file changed

+58
-5
lines changed

1 file changed

+58
-5
lines changed

docs/tutorials/time-ranges.md

+58-5
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,27 @@ The `trimmed_range_in_parent()` is specified in the parent time frame.
112112

113113
## Tracks
114114

115-
TODO.
115+
### `Track.available_range()`
116+
117+
Total duration of the track, totalling all items inside it.
118+
For example, if there is a clip and a gap in the track,
119+
and each is 5 seconds long, the `available_range()`
120+
would return 10 seconds.
121+
122+
### `Track.range_of_child_at_index(index)`
123+
124+
Returns range of nth item (specified by `index`) in the track.
125+
Same as item's `duration`, including transition time.
126+
127+
### `Track.trimmed_range_of_child_at_index(index)`
128+
129+
Same as `range_of_child_at_index()`,
130+
but trimmed relative to the track's source range.
131+
132+
### `Track.range_of_all_children()`
133+
134+
Returns a list of every item,
135+
mapped to their trimmed range in the track.
116136

117137
## Markers
118138

@@ -133,16 +153,49 @@ time.
133153

134154
## Transitions
135155

136-
TODO.
156+
### `Transition.range_in_parent()`
157+
158+
Range of transition for whatever holds the transition.
159+
Calls its parent's `range_in_child()`.
160+
161+
### `Transition.trimmed_range_in_parent()`
162+
163+
The same as `range_in_parent()`,
164+
but trimmed relative to the parent.
165+
Calls its parent's `trimmed_range_in_child()`.
137166

138167
## Gaps
139168

140-
TODO.
169+
### `Gap.source_range`
170+
171+
Time range of the gap, in between other items like Clips.
141172

142173
## Stacks
143174

144-
TODO.
175+
### `Stack.source_range`
176+
177+
Defined range for the set of tracks.
178+
179+
### `Stack.available_range()`
180+
181+
Returns a range representing its tracks' longest duration
182+
(based on the underlying clip `duration()`s).
183+
184+
### `Stack.range_of_child_at_index(int index)`
185+
186+
Returns the total duration of the track at position `index`.
187+
188+
### `Stack.trimmed_range_of_child_at_index(int index)`
189+
190+
Same as `range_of_child_at_index()`, but trimmed relative
191+
to the duration of the `source_range` of the stack.
192+
193+
### `Stack.range_of_all_children()`
194+
195+
Returns set of Tracks mapped to their individual time ranges.
145196

146197
## Timelines
147198

148-
TODO.
199+
### `Timeline.range_of_child(child)`
200+
201+
Get trimmed time range of direct as well as indirect children (like clips and gaps).

0 commit comments

Comments
 (0)