Add the markers argument to the Track constructor. - #2053
peter-targett wants to merge 3 commits into
Conversation
Now any markers assigned at the track level item are initialised. Moved the markers argument ahead of color to try and maintain some consistency with the parent class. Simple test added. Signed-off-by: Peter Targett <petert@filmlight.ltd.uk>
|
It looks like this API change causes some tests to fail. This change would require users of OTIO to update their code. For most API changes we try to deprecate the old way, but still support it for a release. Unlike Python where keyword arguments can be in any order, this is tricky to do with a C++ constructor. As much as I'd like to keep the argument order consistent with the parent class, it might not be worth the hassle in this case. For your use case, are you able to construct a Track and then assign markers to it afterwards? |
I thought this would be a possible issue, I will change it.
As mentioned, it's motivated by the AAF adapter updates, it only looks for markers in the track. In the C++ API there is no way to assign markers after constructor use, you can only query the markers after the fact. |
Update test. Signed-off-by: Peter Targett <petert@filmlight.ltd.uk>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2053 +/- ##
=======================================
Coverage 83.52% 83.52%
=======================================
Files 182 182
Lines 13533 13532 -1
Branches 1255 1255
=======================================
Hits 11303 11303
+ Misses 2057 2056 -1
Partials 173 173
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
Track inherits from Item, so you can modify the list of markers like this: Here's an example in the Raven source code that works to add markers to a Clip or Track or Stack (though Raven seems to have a bug in displaying track markers...) https://github.com/OpenTimelineIO/raven/blob/624951e89bb531a376327e0233c0e6ed6dffccb7/editing.cpp#L190 |
Now any markers assigned at the track level item are initialised.
Moved the markers argument ahead of color to try and maintain some consistency with the parent class.
Simple test added.
Changed required because otherwise there is no way to assign markers to a track in the C++ API - motivated by recent changes to the AAF adapter to add write-marker support.