Skip to content

Commit

Permalink
Reader: Fixed issue with markers not attaching due to Slot ID mismatch
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Lehr <[email protected]>
  • Loading branch information
timlehr committed May 24, 2024
1 parent 1621551 commit 7e6cd4d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/otio_aaf_adapter/adapters/advanced_authoring_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ def _transcribe(item, parents, edit_rate, indent=0):

event_mob = event_mobs[-1]

metadata["AttachedSlotID"] = int(metadata["DescribedSlots"][0])
metadata["AttachedSlotIds"] = [int(x) for x in metadata["DescribedSlots"]]
metadata["AttachedPhysicalTrackNumber"] = int(
event_mob["PhysicalTrackNumber"].value
)
Expand Down Expand Up @@ -1248,15 +1248,14 @@ def _attach_markers(collection):
track_number = metadata.get("PhysicalTrackNumber")
if slot_id is None or track_number is None:
continue

tracks_map[(int(slot_id), int(track_number))] = track

# iterate all tracks for their markers and attach them to the matching item
for current_track in timeline.find_children(
descended_from_type=otio.schema.Track):
for marker in list(current_track.markers):
metadata = marker.metadata.get("AAF", {})
slot_id = metadata.get("AttachedSlotID")
attached_slot_ids = metadata.get("AttachedSlotIds", [])
track_number = metadata.get("AttachedPhysicalTrackNumber")
target_track = tracks_map.get((slot_id, track_number))

Expand Down

0 comments on commit 7e6cd4d

Please sign in to comment.