New Animation Timeline GUI
Work-in-progress merge request. Part of our bigger Animation Next project for Krita 5!
This MR is an improvement to Krita's animation UI that combines elements of the Animation Docker and Timeline Docker into a single, encapsulated Animation Timeline Docker that will contain all of the features needed to do raster animation presented in a clean and easy-to-use way. You can read more about our motivation here.
Because all of the features of the old Animation Docker are being added to the Animation Timeline Docker or extracted into reusable widgets, this MR will eventually remove the Animation Docker entirely. You served us well Animation Docker!
We've created a new, reusable KisUtilityTitleBar widget that's able to neatly store widgets between the docker title and decorations (float/close buttons). This is something that can easily be used elsewhere in the future, such as on the Animation Curves Docker and any other typically horizontal docker, to make better use of space and improve presentation. It's a bit larger than Krita's normal docker title bars, but reasonably so!
We've also broken the animation transport controls into a new, reusable KisTransportControls widget. This is a simple widget that provides the main buttons needed to play, pause, stop and navigate any time-based model and can probably also be easily used in the Animation Curves Docker, an upcoming Storyboard Docker, etc. This is not a 1:1 recreation of the Animation Docker's previous transport controls, though as of now it's mostly feature complete, and has a play/pause button as well as a separate stop button.
The play/pause feature of the timeline now allows the animator to pause the timeline during playback, leaving the currently selected frame wherever it happened to be. This is useful for timing parts of an animation.
The stop feature works mostly the same as it did before, with the addition that if stop is clicked again while the animation is currently stopped it moves the selection back to the start frame. This is useful for playing your animation from the start without having to manually scrub back to the first frame and is a also replacement for the old "just to start frame" button.
The prev/next frame buttons work as they did before, however we haven't yet added the prev/next keyframe buttons. We also haven't added a "jump to end frame" button.
The AutoKey button is a placeholder for now, as is the new Audio menu button.
Finally, the Add/Remove "opacity keyframe" buttons have been omitted, as it seems that those are more relevant to the Animation Curves Docker. Some associated UI code for adding and creating opacity keyframes was also removed for the same reason.
(Emmet and Eoin)
Test Plan
Please help test it by creating or playing back some animations.
If something isn't working or doesn't work well, let us know.
And, if you have some other ideas for how we can improve it, including ideas for additional animation features, let us know.
Now is a great time to scrutinize how our animation tools work, look and feel, and make as many improvements as possible! Nothing held sacred, nothing taken for granted, right?
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.