AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.47k stars 294 forks source link

EDL CMX_3600 adapter: does not support multiple markers per clip. #593

Closed elabrosseRodeofx closed 2 years ago

elabrosseRodeofx commented 5 years ago

Right now the cmx_3600 adapter does not support multiple markers per clip. This is the content of an EDL file exported from Avid media composer:

TITLE:   Untitled Sequence.01
FCM: NON-DROP FRAME
001  103043_0 V     C        01:00:00:00 01:00:08:10 01:00:00:00 01:00:08:10
* FROM CLIP NAME:  MYMEDIA.MOV
* LOC: 01:00:02:01 RED     FIRST MARKER NAME
* LOC: 01:00:04:10 RED     SECOND MARKER NAME
* LOC: 01:00:05:19 RED     THIRD MARKER NAME

Current behavior:

>>> timeline = otio.adapters.read_from_file('/devLocal/elabrosse/rdoenv/auto_lineup/markers.edl')
>>> list(timeline.each_clip())[0].markers
[
otio.schema.Marker(name='THIRD MARKER NAME', marked_range=otio.opentime.TimeRange(start_time=otio.opentime.RationalTime(value=86539, rate=24), duration=otio.opentime.RationalTime(value=0, rate=1)), metadata={'cmx_3600': {'color': u'RED'}})
]

As you can see only the last marker is present in the list.

Expected behavior:

>>> import opentimelineio as otio
>>> timeline = otio.adapters.read_from_file('/path/to/myEdl.edl')
>>> list(timeline.each_clip())[0].markers

[
    otio.schema.Marker(name='FIRST MARKER NAME', marked_range=otio.opentime.TimeRange(start_time=otio.opentime.RationalTime(value=86449, rate=24.0), duration=otio.opentime.RationalTime(value=0.0, rate=1.0)), metadata={'cmx_3600': {'color': 'RED'}}),
    otio.schema.Marker(name='SECOND MARKER NAME', marked_range=otio.opentime.TimeRange(start_time=otio.opentime.RationalTime(value=86506, rate=24.0), duration=otio.opentime.RationalTime(value=0.0, rate=1.0)), metadata={'cmx_3600': {'color': 'RED'}}),
    otio.schema.Marker(name='THIRD MARKER NAME', marked_range=otio.opentime.TimeRange(start_time=otio.opentime.RationalTime(value=86539, rate=24.0), duration=otio.opentime.RationalTime(value=0.0, rate=1.0)), metadata={'cmx_3600': {'color': 'RED'}})
]

My corporation is waiting for confirmation that our CLA was received. We will submit a PR as soon as possible.

elabrosseRodeofx commented 5 years ago

Made a PR:

https://github.com/PixarAnimationStudios/OpenTimelineIO/pull/597

jminor commented 2 years ago

Closed by #664