Add support for ImageSequenceReference to otioz and otiod adapters #1627
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.