New Python library to modify Synfig files: sangfroid 0.1

I have so many bits and pieces of Python code to modify Synfig files that I put them together into a library. This is the first release: sangfroid version 0.1 liverpool.

The easiest way to install it is pip install sangfroid. There is documentation at RTD.

As a demonstration which is also useful, installing sangfroid gives you a script called bywords which times the appearance of words in an animation based on a subtitle file, thus:

word by word
or
letter by letter

sangfroid isn’t perfect but it does the things I need to do. Thus, development may stop here, excepting bug fixes. But if anyone’s interested in helping, we can develop it further.

4 Likes

Sangfroid 0.2 submarine released. Probably the first actually usable version. Go to the release page to grab a copy, or use python -m pip install sangfroid.

Changelog:

Group.append() and Group.insert() allow you to add new layers to a group.

Iterating over Groups gives the layers within that group. Iterating over any other sort of Layer gives nothing. Groups can be indexed with integers, which give you the layers in order. This is a breaking change; previously it iterated over the fields of the Layer, which is rarely something you want to do.

The “desc” field of non-Animation layers can be None, which means there is no description. This differs from a description which is the empty string. This brings us into compliance with Synfig.

Fixed bug preventing instantiation of classes which contained a field with a default value specified in seconds. (See commit 24f19aba.)

Fixed bug preventing update of values in Transformation layers.

Text layers can be constructed by giving the string they are to contain.

Documentation improved a bit.

2 Likes

sangfroid 0.3.0 liverpool released.

This is moving towards general usability. As before, I wrote this because it’s useful to me, and i don’t know of anyone else using it. Thus, things I need will be fixed. I would love to hear if it’s been useful to anyone else.

Changes and fixes:

  • There is fairly extensive documentation
  • Waypoints have their type restricted to the type of their value
  • Waypoints at time=0 have their time saved correctly
  • Some interpolation types had the wrong names in the XML
  • Some XML tag properties containing underscores would be saved both with their proper name and with underscores replaced by hyphens

Install with

python -m pip install sangfroid
4 Likes