These are two python scripts, made to convert animated transform masks’ keyframes into excel tables and back.
Example of the table(“time” is keyframe number):
Why would you need that?
Relatively quick and accurate mass edits of coordinates and making your animated objects follow certain paths that can be calculated with formulas.
(Won’t lie, the solution i made is very rough and there’s still a lot of slow manual work compared to making these animations in programs actually designed for this. I’m hoping that some day i’ll achieve a more convenient solution that will work as a plugin and would only require inputting starting coordinates and settings like radius, but it would take me so much time, i’m not sure if i can afford that. I’ve already been in a hole of developing new things for months, it ended up badly for my health.)
I compiled the scripts into 2 executables that should work without python, but i have no way to test them on another system, so if these won’t work for you, you might need to use python to make the scripts work in their open form instead.
To make them work with python you will need to have installed python and modules “pandas” and “openpyxl”.
It might require some other modules, in which case it will most likely tell you what’s missing after you run the scripts. If they just close without doing anything and sending any messages, you might have to open and run them in IDLE to get error messages.
Due to the fact that i used help of chatgpt and also tried to save a lot of time, all of the keyframe channels ended up being squished together in one table. It’s a bit inconvenient. To add new keyframes and coordinates you will have to move the rest of the data further down.
Also, for the reasons mentioned above, there might be some redundant parts in the code, if i missed any.
If you know python, you can check the script yourself and tell me if there’s anything you don’t like.
I’m not a professional, mistakes are not uncommon for me.
HOW TO USE:
1.Get your .kra project file containing animated transform masks, change its format to .zip and open it with an archive manager.
2.Find a folder named Layers, then find your keyframes file of .xml format.
If you use multiple masks and can’t figure out which file you need, maindoc.xml shows real names of the masks.
3.Take the file out and place it in the folder with the executables.
4.Run the “Convert to excel.exe”
5.Make necessary edits/additions.
6.Run the “Convert back to xml.exe”
7.Rename the new file and replace it with the old one in the archive.
8.Change the archive back to .kra format.
9.Launch the edited project and see if the changes worked.
10.When making another conversion, to avoid conflicts, delete or move the old used files from the folder with executables.
Example of a use case:

Animation of an object moving in a circular pattern(This can also be achieved by grouping the object with an invisible layer and rotating transform mask, or combining rotating and moving transform masks. Or using a more suitable program for this. Each method has its pros and cons):
One of the ways to make rough calculations for this pattern is:
- current x = 1300 (example)
- current y = 960 (example)
- [fr] = total amount of frames, for example 48
- r = radius of the circle. Presumably in pixels. The one used in the example had a value of 100.
- [angle increment] = 2*PI()/[fr]
-
Set up an Excel table with two columns: Frame Number and Angle.
-
In the Frame Number column, list the frame numbers from 1 to the total number of keyframes.
-
Then calculate the angle column using:
Angle = (Frame Number - 1) * Angle increment -
In another two columns, calculate the x and y coordinates for each angle using these equations:
x = 1300 + radius * cos(Angle)
y = 960 + radius * sin(Angle) -
The resulting coordinates can be added as new keyframes in the table.
