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

Keep markers at the track if child_at_time() found something that does not hold markers #1239

Merged
merged 4 commits into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ def _attach_markers(collection):

# determine new item to attach the marker to
target_item = target_track.child_at_time(marker.marked_range.start_time)
if target_item is None:
if target_item is None or not hasattr(target_item, 'markers'):
target_item = target_track

# attach marker to target item
Expand Down
Binary file not shown.
25 changes: 25 additions & 0 deletions contrib/opentimelineio_contrib/adapters/tests/test_aaf_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@
"keyframed_properties.aaf"
)

MARKER_OVER_TRANSITION_PATH = os.path.join(
SAMPLE_DATA_DIR,
"marker-over-transition.aaf",
)


def safe_str(maybe_str):
"""To help with testing between python 2 and 3, this function attempts to
Expand Down Expand Up @@ -1100,6 +1105,26 @@ def test_aaf_transcribe_log(self):
self.assertEqual(result_stdout, TRANSCRIPTION_RESULT)
self.assertEqual(result_stderr, '')

def test_aaf_marker_over_transition(self):
"""
Make sure we can transcibe this composition with markers over transition.
"""

timeline = None

try:
timeline = otio.adapters.read_from_file(
MARKER_OVER_TRANSITION_PATH
)

except Exception as e:
print('[ERROR] Transcribing test sample data `{}` caused an exception: {}'.format(
meshula marked this conversation as resolved.
Show resolved Hide resolved
os.path.basename(MARKER_OVER_TRANSITION_PATH),
e)
)

self.assertIsNotNone(timeline)

def _verify_user_comments(self, aaf_metadata, expected_md):

self.assertTrue(aaf_metadata is not None)
Expand Down