Skip to content

Commit d722d5c

Browse files
committed
Filter clips
1 parent 6ff25de commit d722d5c

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

auto_editor/exports/fcp11.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
from __future__ import annotations
2-
31
import xml.etree.ElementTree as ET
4-
from typing import TYPE_CHECKING, cast
2+
from fractions import Fraction
53
from xml.etree.ElementTree import Element, ElementTree, SubElement, indent
64

5+
from auto_editor.ffwrapper import FileInfo
76
from auto_editor.timeline import Clip, v3
8-
9-
if TYPE_CHECKING:
10-
from fractions import Fraction
11-
12-
from auto_editor.ffwrapper import FileInfo
13-
from auto_editor.utils.log import Log
14-
7+
from auto_editor.utils.log import Log
158

169
"""
1710
Export a FCPXML 11 file readable with Final Cut Pro 10.6.8 or later.
@@ -146,7 +139,7 @@ def make_clip(ref: str, clip: Clip) -> None:
146139
)
147140

148141
if tl.v and tl.v[0]:
149-
clips = cast(list[Clip], tl.v[0])
142+
clips = [clip for clip in tl.v[0] if isinstance(clip, Clip)]
150143
elif tl.a and tl.a[0]:
151144
clips = tl.a[0]
152145
else:

0 commit comments

Comments
 (0)