Skip to content

Filter clips #771

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

Merged
merged 1 commit into from
Jun 14, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
15 changes: 4 additions & 11 deletions auto_editor/exports/fcp11.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
from __future__ import annotations

import xml.etree.ElementTree as ET
from typing import TYPE_CHECKING, cast
from fractions import Fraction
from xml.etree.ElementTree import Element, ElementTree, SubElement, indent

from auto_editor.ffwrapper import FileInfo
from auto_editor.timeline import Clip, v3

if TYPE_CHECKING:
from fractions import Fraction

from auto_editor.ffwrapper import FileInfo
from auto_editor.utils.log import Log

from auto_editor.utils.log import Log

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

if tl.v and tl.v[0]:
clips = cast(list[Clip], tl.v[0])
clips = [clip for clip in tl.v[0] if isinstance(clip, Clip)]
elif tl.a and tl.a[0]:
clips = tl.a[0]
else:
Expand Down
3 changes: 1 addition & 2 deletions auto_editor/exports/shotcut.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import xml.etree.ElementTree as ET
from typing import cast

from auto_editor.timeline import Clip, v3
from auto_editor.utils.func import aspect_ratio, to_timecode
Expand Down Expand Up @@ -71,7 +70,7 @@ def shotcut_write_mlt(output: str, tl: v3) -> None:
producers = 0

if tl.v:
clips = cast(list[Clip], tl.v[0])
clips = [clip for clip in tl.v[0] if isinstance(clip, Clip)]
elif tl.a:
clips = tl.a[0]
else:
Expand Down