mirror of
https://github.com/OpenVGLab/OmniLottie.git
synced 2026-09-17 15:46:26 +00:00
12 lines
347 B
Python
12 lines
347 B
Python
|
|||
|
|
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 "")
|