Skip to content

Commit d9f957c

Browse files
Merge branch 'master' into MB_Fixes
* master: Aaf adapter target url fix (AcademySoftwareFoundation#628) C++ Error documentation additions (AcademySoftwareFoundation#620) Issue 622 (AcademySoftwareFoundation#624) Add Kdenlive adapter (AcademySoftwareFoundation#618)
2 parents d45cc05 + 3ae4499 commit d9f957c

File tree

10 files changed

+1547
-7
lines changed

10 files changed

+1547
-7
lines changed

contrib/opentimelineio_contrib/adapters/aaf_adapter/aaf_writer.py

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,32 @@
4949
AAF_OPERATIONDEF_SUBMASTER = uuid.UUID("f1db0f3d-8d64-11d3-80df-006008143e6f")
5050

5151

52+
def _is_considered_gap(thing):
53+
"""Returns whether or not thiing can be considered gap.
54+
55+
TODO: turns generators w/ kind "Slug" inito gap. Should probably generate
56+
opaque black instead.
57+
"""
58+
if isinstance(thing, otio.schema.Gap):
59+
return True
60+
61+
if (
62+
isinstance(thing, otio.schema.Clip)
63+
and isinstance(
64+
thing.media_reference,
65+
otio.schema.GeneratorReference)
66+
):
67+
if thing.media_reference.generator_kind in ("Slug",):
68+
return True
69+
else:
70+
raise otio.exceptions.NotSupportedError(
71+
"AAF adapter does not support generator references of kind"
72+
" '{}'".format(thing.media_reference.generator_kind)
73+
)
74+
75+
return False
76+
77+
5278
class AAFAdapterError(otio.exceptions.OTIOError):
5379
pass
5480

@@ -144,7 +170,7 @@ def validate_metadata(timeline):
144170

145171
for child in timeline.each_child():
146172
checks = []
147-
if isinstance(child, otio.schema.Gap):
173+
if _is_considered_gap(child):
148174
checks = [
149175
__check(child, "duration().rate").equals(edit_rate)
150176
]
@@ -223,6 +249,8 @@ def _generate_empty_mobid(clip):
223249
clip_mob_ids = {}
224250

225251
for otio_clip in input_otio.each_clip():
252+
if _is_considered_gap(otio_clip):
253+
continue
226254
for strategy in strategies:
227255
mob_id = strategy(otio_clip)
228256
if mob_id:
@@ -281,7 +309,7 @@ def __init__(self, root_file_transcriber, otio_track):
281309

282310
def transcribe(self, otio_child):
283311
"""Transcribe otio child to corresponding AAF object"""
284-
if isinstance(otio_child, otio.schema.Gap):
312+
if _is_considered_gap(otio_child):
285313
filler = self.aaf_filler(otio_child)
286314
return filler
287315
elif isinstance(otio_child, otio.schema.Transition):

contrib/opentimelineio_contrib/adapters/contrib_adapters.plugin_manifest.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@
5656
"execution_scope": "in process",
5757
"filepath": "xges.py",
5858
"suffixes": ["xges"]
59+
},
60+
{
61+
"OTIO_SCHEMA": "Adapter.1",
62+
"name": "kdenlive",
63+
"execution_scope": "in process",
64+
"filepath": "kdenlive.py",
65+
"suffixes": ["kdenlive"]
5966
}
6067
],
6168
"schemadefs" : [

0 commit comments

Comments
 (0)