Skip to content

Commit

Permalink
Loft arguments out of kwargs (#56)
Browse files Browse the repository at this point in the history
* Loft arguments out of kwargs

* for users that want to know what commandline options are available,
  lofting them out of kwargs makes them visible in `otiopluginfo`
  output.

* removing comment

---------

Co-authored-by: ssteinbach <[email protected]>
  • Loading branch information
ssteinbach and ssteinbach authored Feb 4, 2025
1 parent 8db72e8 commit 0421750
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 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,27 @@ def read_from_file(
return result


def write_to_file(input_otio, filepath, **kwargs):
def write_to_file(
input_otio,
filepath,
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

0 comments on commit 0421750

Please sign in to comment.