Script for resetting animated values

Hi guys,

This is a very specific script that removes any animated parameters, so your Synfig project can be restored to the “clear” state. It removes any kind of waypoints including those of ‘undefined’ type that you can’t remove from GUI sometimes, keyframes are also removed except the initial one (at 0f).

Be careful: script processes your animation in place, but backup is done before processing so it can be restored if something goes wrong.
Tested on pretty complex animations with particle templates and a lot of exported values, seems to work well.

Coded in PERL (XML processing) + BAT (just a shell).
Script: onedrive.live.com/redir?resid=D … older%2cpl, file RstAni.exe (runs on Windows 7, 8, 10, XP not tested).
Sources in the same folder, file ResetAnimation.pl.

Posted here in case someone would like to port it to Synfig plug-in system.

Great job :slight_smile:
Porting to Python will be done in a snap.
Thank you :smiley:

wget http://www.geekopolis.ca/amorok/synfigstudio/amorok_motion_comic2.sifz echo $(cat amorok_motion_comic2.sifz | gunzip -f | sed 's/<entry on=".*">/<entry on="">/g') \ | sed 's/<waypoint/\n<waypoint/g; s/<\/waypoint>/<\/waypoint>\n/g' \ | grep -v '<waypoint'

I remove all line ‘waypoint’ and clean ‘on’ in ‘entry’ (on="")… This is everything or need to erase something more?

It’s a bit more complicated.
Unfortunately, it’s under Windows, but script (ResetAnimation.pl) is written in Perl so it should be cross-platform.
If you’re on Linux, you probably have Perl installed by default, so try this:

  1. perl -MCPAN -e install Data::GUID
  2. perl -MCPAN -e install XML::libXML
  3. perl ResetAnimation.pl Path to sif file

And be warned, I did not test it on Linux.