Future of the animation feature

Jouni Pentikäinen mctyyppi42 at gmail.com
Mon Dec 15 19:44:53 UTC 2014


Animation seems to be one of the most anticipated upcoming features. I 
am looking forward to it myself and would like to help in implementing 
this feature. It would be all too easy to jump in and code away, only to 
find out later I've taken things to a completely different direction 
than other people had in mind. So, I would like to take some time first 
to discuss a few design decisions. The two major ones are how to 
organize the classes and what kind of a file format to use.

Nearly all animation related data and functionality is currently 
contained within a single class, KisAnimationDoc. It handles all kinds 
of operations from playback to renaming files. This needs refactoring to 
improve the separation of concerns.

Another issue is that currently the animator effectively reimplements 
its own layer stack. I think this is unnecessary. I suggest we add a new 
layer type instead, an animated layer, which would integrate into the 
Krita layer stack. Existing workflows with layer groups, masks, filters, 
etc. would work as expected with little or no additional work.

This is implementable as a subclass of KisPaintLayer. All the frames 
associated with the animation layer would be contained here. As the 
active frame of the animation is changed, this class would swap the 
appropriate contents into view. I have made a quick prototype to test 
this concept and it works surprisingly well.

For file formats I see two main options: either a dedicated file format 
for animations, or including animations in the .kra format. The current 
implementation seems to favor the former approach, while I would prefer 
the latter. Instead of having two file formats, which are functionally 
nearly identical, a single format seems preferable as it would allow 
more fluid workflows and less specialized code. However, I can see 
arguments for both sides.

Any thoughts or comments on these or other issues related to animation 
on Krita? I'd like to hear what you think this feature should be like.


More information about the kimageshop mailing list