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

MasterMob Transcribing Changes #44

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 6 additions & 5 deletions src/otio_aaf_adapter/adapters/aaf_adapter/aaf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ def validate_metadata(timeline):
checks = [
__check(child, "duration().rate").equals(edit_rate),
__check(child, "metadata['AAF']['PointList']"),
__check(child, "metadata['AAF']['OperationGroup']['Operation']"
"['DataDefinition']['Name']"),
__check(child, "metadata['AAF']['OperationGroup']['Operation']"
"['Description']"),
__check(child, "metadata['AAF']['OperationGroup']['Operation']"
Expand All @@ -276,7 +274,8 @@ def _gather_clip_mob_ids(input_otio,

def _from_clip_metadata(clip):
"""Get the MobID from the clip.metadata."""
return clip.metadata.get("AAF", {}).get("SourceID")
return (clip.metadata.get("AAF", {}).get("MobID") or
clip.metadata.get("AAF", {}).get("SourceID"))

def _from_media_reference_metadata(clip):
"""Get the MobID from the media_reference.metadata."""
Expand Down Expand Up @@ -510,8 +509,8 @@ def aaf_transition(self, otio_transition):
by_pass = op_group_metadata["Operation"].get("Bypass")
number_inputs = op_group_metadata["Operation"].get("NumberInputs")
operation_category = op_group_metadata["Operation"].get("OperationCategory")
data_def_name = op_group_metadata["Operation"]["DataDefinition"]["Name"]
data_def = self.aaf_file.dictionary.lookup_datadef(str(data_def_name))
data_def = self.aaf_file.dictionary.lookup_datadef(str(self.media_kind))

description = op_group_metadata["Operation"]["Description"]
op_def_name = otio_transition.metadata["AAF"][
"OperationGroup"
Expand Down Expand Up @@ -598,6 +597,8 @@ def _create_tapemob(self, otio_clip):
tapemob_slot = tapemob.create_empty_slot(self.edit_rate, self.media_kind)
tapemob_slot.segment.length = int(
otio_clip.media_reference.available_range.duration.value)
tapemob_slot.segment.start = int(
otio_clip.media_reference.available_range.start_time.value)
return tapemob, tapemob_slot

def _create_filemob(self, otio_clip, tapemob, tapemob_slot):
Expand Down
Loading