Files
OmniLottie/lottie/exporters/sif.py
T

12 lines
347 B
Python
Raw Normal View History

2026-03-01 21:36:54 +08:00
from .base import exporter
from ..parsers.sif.builder import to_sif
from ..utils.file import open_file
@exporter("Synfig", ["sif"], [], {"pretty"})
def export_sif(animation, file, pretty=True):
with open_file(file) as fp:
dom = to_sif(animation).to_xml()
dom.writexml(fp, "", " " if pretty else "", "\n" if pretty else "")