Skip to content

Commit 1dc8f64

Browse files
committed
Bug fix: EDL transition cut event references A side
1 parent 1c29e0a commit 1dc8f64

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

opentimelineio/adapters/cmx_3600.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def write_to_string(input_otio, rate=None, style='avid'):
629629
# |---------|
630630
# 100
631631

632-
# Event line to represent this "shorted" A side
632+
# Event line to represent this "shorter" A side
633633
a_side_line = EventLine(
634634
kind=kind,
635635
edit_number=edit_number,
@@ -680,7 +680,7 @@ def write_to_string(input_otio, rate=None, style='avid'):
680680
edit_number=edit_number,
681681
rate=edl_rate
682682
)
683-
cut_line.reel = b_side_line.reel
683+
cut_line.reel = a_side_line.reel
684684
cut_line.source_in = a_side_line.source_out
685685
cut_line.source_out = a_side_line.source_out
686686
cut_line.record_in = a_side_line.record_out

tests/test_cmx_3600_adapter.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ def test_nucoda_edl_write_with_transition(self):
393393
)
394394

395395
cl = otio.schema.Clip(
396+
metadata={'cmx_3600': {'reel': 'Reel1'}},
396397
source_range=otio.opentime.TimeRange(
397398
start_time=otio.opentime.RationalTime(131.0, 24.0),
398399
duration=otio.opentime.RationalTime(102.0, 24.0)
@@ -403,21 +404,20 @@ def test_nucoda_edl_write_with_transition(self):
403404
out_offset=otio.opentime.RationalTime(43.0, 24.0)
404405
)
405406
cl2 = otio.schema.Clip(
407+
metadata={'cmx_3600': {'reel': 'Reel2'}},
406408
source_range=otio.opentime.TimeRange(
407409
start_time=otio.opentime.RationalTime(280.0, 24.0),
408410
duration=otio.opentime.RationalTime(143.0, 24.0)
409411
)
410412
)
411413
cl3 = otio.schema.Clip(
414+
metadata={'cmx_3600': {'reel': 'Reel3'}},
412415
source_range=otio.opentime.TimeRange(
413416
start_time=otio.opentime.RationalTime(0.0, 24.0),
414417
duration=otio.opentime.RationalTime(24.0, 24.0)
415418
)
416419
)
417-
tl.tracks[0].append(cl)
418-
tl.tracks[0].append(trans)
419-
tl.tracks[0].append(cl2)
420-
tl.tracks[0].append(cl3)
420+
tl.tracks[0].extend([cl, trans, cl2, cl3])
421421

422422
result = otio.adapters.write_to_string(
423423
tl,
@@ -427,13 +427,13 @@ def test_nucoda_edl_write_with_transition(self):
427427

428428
expected = \
429429
'TITLE: CrossDissolve_Day-Night_Long_1 from CZuber\n\n' \
430-
'001 AX V C 00:00:05:11 00:00:07:08 ' \
430+
'001 Reel1 V C 00:00:05:11 00:00:07:08 ' \
431431
'00:00:00:00 00:00:01:21\n' \
432-
'002 AX V C 00:00:07:08 00:00:07:08 ' \
432+
'002 Reel1 V C 00:00:07:08 00:00:07:08 ' \
433433
'00:00:01:21 00:00:01:21\n' \
434-
'002 AX V D 100 00:00:09:07 00:00:17:15 ' \
434+
'002 Reel2 V D 100 00:00:09:07 00:00:17:15 ' \
435435
'00:00:01:21 00:00:10:05\n' \
436-
'003 AX V C 00:00:00:00 00:00:01:00 ' \
436+
'003 Reel3 V C 00:00:00:00 00:00:01:00 ' \
437437
'00:00:10:05 00:00:11:05\n'
438438

439439
self.assertEqual(result, expected)

0 commit comments

Comments
 (0)