Skip to content

Commit

Permalink
Adjust audio track export.
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-ynput committed Nov 27, 2024
1 parent fbdc076 commit c778376
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions client/ayon_flame/otio/flame_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def _get_segments_from_track(flame_track):
List[flame.PySegment]. The gathered segments.
"""
all_segments = []
for segment in track.segments:
for segment in flame_track.segments:
clip_data = _get_segment_attributes(segment)
if clip_data:
all_segments.append(clip_data)
Expand Down Expand Up @@ -637,21 +637,29 @@ def create_otio_timeline(sequence):

# Add segments onto track.
segments = _get_segments_from_track(track)
log.debug("_ segments: %s", pformat(all_segments))
log.debug("_ segments: %s", pformat(segments))
_distribute_segments_on_track(segments, otio_track)

# add track to otio timeline
otio_timeline.tracks.append(otio_track)

# create otio audio tracks with clips
for audio_track in sequence.audio_track:
for audio_track in sequence.audio_tracks:

if (
not audio_track.stereo or
audio_track.stereo and len(audio_track.channels) <= 2
):
audio_channel = audio_track.channels[0]

# avoid all empty tracks
# or hidden tracks
if (
len(audio_channel.segments) == 0
or audio_channel.hidden.get_value()
):
continue

otio_track = create_otio_track(
"audio", str(audio_track.name)[1:-1])

Expand Down

0 comments on commit c778376

Please sign in to comment.