Synfig .sif File Format Specification?

Hi guys,

Is there any formal specification for the .sif (uncompressed .sifz) file format, or even something like an XML Schema Definition, so that I can potentially make plugins to read and write it from other applications?

Or am I just going to have to reverse-engineer it? :confused:

There is nothing formally written than the source code that read and writes the sif(z) files.
Here they are: … canvas.cpp … canvas.cpp

Also, if the sif file defines a layer and miss one parameter, the default one is used. Default parameters values are in the constructors of the Layers definitions. See the source code for them:

Here: … src/synfig
And here: … rc/modules

You can have more information about the structure of the classes here: … Layer.html

Visiting the get_param_vocab member for each layer, you can see the name of each parameter used in the sif file. Layer vocabulary is accumulative so, for example, the vocabulary of the Star layer is the accumulation of its ancestors: Star<-Polygon<-Shape<-Layer_Composite<-Layer

I hope it helps.

I also have some code in

So if you happen to be coding in python, maybe it would be possible to abstract the sif-related code into a shared library.

Is looking at the code still the best way to figure how the sif files are specified?

I’d like to write a script that converts between lottie json into sif files but I need to know how sif files are structured to do so.

Look directly at .sif files and be permissive…
The format changes regularly (soon Loopyness parameter will not appear anymore in Outline Layer for example)