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

Add support for ImageSequenceReference to otioz and otiod adapters #1627

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

darbyjohnston
Copy link
Contributor

@darbyjohnston darbyjohnston commented Jun 12, 2023

Fixes #1621

This PR adds support for ImageSequenceReference media references to the otioz and otiod adapters. It should also add support for multiple media references but I haven't tested that yet.

The main changes are to the function _prepped_otio_for_bundle_and_manifest which is shared by both adapters. Previously the function returned a map of media paths and associated media references. The media paths were used to locate the media files and the media references were used to relink the resulting .otio file. Since image sequence references can produce multiple media paths (render.0001.exr, render.0002.exr, etc.) that mapping didn't seem to make sense any more so I changed the function to just return the list of media files. The relinking is now handled as a separate step that iterates through the media references on its own.

I have tested converting some simple .otio files with both movies and image sequences to .otioz and .otiod and have verified the results look OK. Most of the unit tests look like they are passing OK though I still need to add tests for the new functionality.

@meshula meshula requested a review from ssteinbach June 12, 2023 04:59
Signed-off-by: Darby Johnston <[email protected]>
Signed-off-by: Darby Johnston <[email protected]>
Comment on lines +124 to +125
"The {} adapter only works with file URLs."
" Got a URL of: '{}'".format(adapter_name, url)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor note, update to f-string

Suggested change
"The {} adapter only works with file URLs."
" Got a URL of: '{}'".format(adapter_name, url)
f"The {adapter_name} adapter only works with file URLs."
f" Got a URL of: '{url}'"

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

Successfully merging this pull request may close these issues.

Add support for image sequences when creating .otioz files with otioconvert
2 participants