AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO
FCP XML: Support appropriate top-level objects beyond project
- Dominant language
- C++
- Stars
- 2k
- Forks
- 351
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 1
Description
Right now the FCP XML adapter writes out timeline objects under a project. The FCP XML spec designates you can actually have `project`, `bin`, `clip`, and `sequence` objects as top level.
Given the OTIO data model, the best analogues would be to switch on the object type passed to the adapter to write and map as follows:
1. `Timeline` -> `sequence`
1. `SerializableCollection` -> `bin`
I don't think there is a reasonable analogue for `project` in otio. Perhaps passing a single otio `Clip` object could write a top-level `clip`, however I think it's much more in-line with otio usage to write a `SerializableCollection` top-level.
For import, I think the behavior should be:
- If the top-tag is a `project` and there is only one child element, it's object will be returned as the top-level object, otherwise a `SerializableCollection` will be returned.
- If there are multiple top-level tags under the `xmeml` tag or a single clip, these will be returned in a `SerializableCollection`
- A single `sequence` is returned as a `Timeline`
- A single `bin` is returned as a `SerializableCollection`
Elements of this behavior exist already, but this could be more fleshed out.
Contributor guide
Research direction
Start at the FCP XML adapter's existing top-level export and import handling. Compare the current project-wrapped timeline behavior with the requested mappings for Timeline, SerializableCollection, clip, sequence, bin, and project, then verify that each listed single- and multiple-object case returns or writes the specified top-level form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- xml
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100