Keyframe clones
Open, Needs TriagePublic


Animators often need to re-use drawings. Currently the only way to do this is to create a copy. This has two downsides: changes to the frames are not reflected in the copies, and the redundant copies put a significant strain on the system's memory. To solve these issues, we should allow users to create cloned copies of frames, which share the same drawing.

Internally we already already distinguish the drawings by a numeric ID. This ID could be shared between multiple keyframes.

Preliminary requirements:

  • A clone frame can be created by dragging a keyframe on the timeline with ctrl + shift
    • Additionally from context menu or through animation docker?
  • Any modification to a frame's content affects all instance
  • When a frame is selected on the timeline, all other instances of it are indicated (e.g. by hightlight or a symbol)

Open questions:

  • Can anyone think of a more suitable name for the feature?
  • Should frames with multiple instances be rendered differently on the timeline (e.g. different shape)?
  • Should all instances of a frame always share the same color label?
  • Should we display the frame ID to the user somewhere?
jounip created this task.May 21 2018, 10:47 AM

Hi, @jounip!

I have tested your patch. It looks fine, but I'm really not sure that users need "clone frames" in a state as we (developers) understand it. The thing that animators need is to create infinite cycles (not technically infinite, but "until the next custom frame"). And, optionally, they might also like "unwrapping" such cycles into a set of normal or clone frames. Can we first implement such "cycles" in the GUI and then start thinking about real "clones"?

If we try to flesh out the clones without the cycles themselves we can easily overcomplicate stuff and we will have to rework it later.

Btw, there also a small assert when trying to create the first frame at zero position on a non-animated layer:
SAFE ASSERT (krita): "frameId >= 0" in file /home/appimage/persistent/krita/libs/image/kis_raster_keyframe_channel.cpp, line 343

Bollebib added a subscriber: Bollebib.EditedSep 13 2018, 12:21 PM

i wanted to answer dmitry first.

Clone frames are very necessary,cycles are good but not everything can be done with cycles,and ANYTHING that can reduce memory footprint and frames in a random order that get repeated (can be effects or elements ,eyes, hands with different timings....Can also just be crowd shots that are duplicated or flying birds or whatever.

But yes cycles should come first

As for the questions:

  1. Clone frames is probably the correct name as we also have clone layers,it will make clear what they are

2)Probably ,or maybe they should have a symbol like a "link" or a "c" for clone or something like that.

3)probably yes, i think it will be a bit too messy if colors can be different,the idea is to also be able to read the timeline well,same color same image will help with that.

4)maybe in the popup when you hover over the frame? Could also be a RMB menu item.

I could even forsee a function where you "select all images with the same ID" To delete them or to find all instances in big files