Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FCP XML: Support appropriate top-level objects beyond project #514

Open
reinecke opened this issue May 7, 2019 · 3 comments
Open

FCP XML: Support appropriate top-level objects beyond project #514

reinecke opened this issue May 7, 2019 · 3 comments

Comments

@reinecke
Copy link
Collaborator

reinecke commented May 7, 2019

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
  2. 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.

@ssteinbach
Copy link
Collaborator

What is in the Project but not in a bin or sequence? So far we've resisted having a 'Project' type object

@wrosecrans
Copy link

AFAICT, "Project" literally just has Children and a Name: (Where "Children" can just be Clips, Timelines, or Bins)
:
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/FinalCutPro_XML/Elements/Elements.html#//apple_ref/doc/uid/TP30001156-TPXREF104

It can probably be mostly ignored for OTIO schema sake, and treated as a Collection like a Bin that is at the top/root level. (And any comment/label metadata applied to the top level collection just wouldn't survive being written to xmeml, because the Project isn't supposed to have them.)

@ssteinbach
Copy link
Collaborator

ssteinbach commented May 8, 2019

Ah, yup. That sounds like a SerializableCollection. Sounds good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Interoperation
  
To do
Development

No branches or pull requests

3 participants