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

Loft arguments out of kwargs #56

Merged
merged 3 commits into from
Feb 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/otio_aaf_adapter/adapters/advanced_authoring_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -1638,15 +1638,29 @@ def read_from_file(
return result


def write_to_file(input_otio, filepath, **kwargs):
def write_to_file(
input_otio,
filepath,
# lofting these options out of the aaf writer to make them visible in the
# `otiopluginfo` output.
prefer_file_mob_id=False,
use_empty_mob_ids=False,
**kwargs
):

with aaf2.open(filepath, "w") as f:

timeline = aaf_writer._stackify_nested_groups(input_otio)

aaf_writer.validate_metadata(timeline)

otio2aaf = aaf_writer.AAFFileTranscriber(timeline, f, **kwargs)
otio2aaf = aaf_writer.AAFFileTranscriber(
timeline,
f,
prefer_file_mob_id=prefer_file_mob_id,
use_empty_mob_ids=use_empty_mob_ids,
**kwargs
)

if not isinstance(timeline, otio.schema.Timeline):
raise otio.exceptions.NotSupportedError(
Expand Down
Loading