Manipulate the animation timeline and use controls for playback
Animation is enabled by layer. By default layers are not able to be animated. The reason is that there are extra things that animated layers need to do that might slow down the application. We only want this technical overhead for layers that need animation. It is easy enough to change. Before you can manipulate the animation timeline or add keyframes, you need to make sure the layer has animation enabled. You can check if a layer has animation enabled and enable it like this
One visual thing you will notice with animation layers is that a light bulb icon will appear by the layer. This is for turning on and off onion skinning.
Once your layer has animation enabled, you might want to move around the timeline or change properties. This is how you would do things like changing to a different frame or changing the playback range.
All of these properties are using the Krita library API. If you want to learn more about what is available, check out the Document API.
Many common commands that you can access from the UI are available as actions. Like many things in scripting with Krita, if something doesn't exist in the Krita library API, you can check the available actions. Check out the Action Dictionary to see what other actions are available if you are looking for other functionality.
Tip
You can only affect one layer at a time with animation commands. You might need to change the active layer before you start adding frames, removing, or importing animations
You might be using external programs to create animations. For your purpose you might just want to bring these frames into Krita for some touch-up or other work. To do this you will need to get a list of images that you want to import, then use the import animation method to pull them all in like this.
If you want to do something more complex like importing videos, you will have to work with external command line tools to extract the images from the video. If you want to see a more complex example of how this might be done using FFMPEG, you can take a look at Scott Petrovic's Animator Video Reference plugin.
At this time there is no automatic animation exporting available with configurable options. There is some actions we can use that might work.
We went over how to make a layer property animatable. We then went over some of the scripting way to move around the timeline, add and remove keyframes, and finally how to import and export out your animations.
Head to the Krita artists where we have a dedicated area for plugin development and give any feedback you might have.