Skip to content

Animation: Clone Frames

Emmet O'Neill requested to merge (removed):ani/cloneframes into master

(NOTE: While ready to test, this is a work-in-progress merge request as it depends on !448 (merged) and there's still a bunch of workflow/UX polishing needed.)

Screenshot_from_2020-08-15_15-11-37

Clone Frames

This patch, which is built on top of our pending KisKeyframeChannel/KisKeyframe refactor (!448 (merged)), adds the ability to create Clone Frames, raster keyframes that point to the exact same piece of physical frame data inside of a KisPaintDevice. An often requested feature, clone frames allow the animator to easily reuse an existing keyframe throughout their animation and (unlike a duplicated frame) changes made to one instance are reflected in all of its clones.

Use

Here's a link to Eoin's dropbox where you can download a test appimage and (if you don't want to make one) a test animation file.

(Creating clones is a little bit finicky right now due to the some conflicting UX designs in the current Timeline Docker. We're aware of this and have a couple of ideas for how we might change the current timeline UX, but please feel free to share your opinions on how all of this should work and we can talk about it.)

  • You can create a clone by holding ALT, Left-Click Dragging a raster keyframe, and Releasing Left-Click over another frame slot. (This is similar to duplicating a frame, but with ALT instead of CTRL.) Looking at the timeline, you'll see that the active frame and all of its clones will be given diagonal stripes, showing you all of the frames that will currently change when you draw something. (See the stripy clones at frames 25, 31 and 37 in the screenshot above.)

  • We've added a Clone Keyframes context menu action to the frames view grid. This works just like copying keyframes to the clipboard, but the pasted frames will be clones!

  • We've also added a Make Unique context menu action that exists when right-clicking on a clone frame. This allows you to convert any clone frame into a regular duplicate instead.

Notes and Limitations:

  • Because clone frames are essentially shared pointers to the exact same KisRasterKeyframe they share all internal data, including the frameID (the handle to the physical frame on the KisPaintDevice) as well as color labels. In other words, they're effectively the same frame.

  • Because each channel has its own paint device and KisKeyframes, there is a fundamental limitation to Krita's current animation system that prevents us from creating cross-layer clones. This probably isn't a huge deal or a blocker, as the use case seems relatively niche. Trying to clone across layers will simply create a duplicate frame instead.

Known Bugs

  • For some reason scrubbing through the timeline occasionally leaves stripes on frames that aren't clones. This is a visual/UI bug only and doesn't have any effect on the functionality of this feature. Not sure what's causing it just yet, but we'll track it down. It seems to only happen when there is only one layer pinned to the timeline.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Designed and programmed with @eoinoneill.

Edited by Emmet O'Neill

Merge request reports

Loading