Last week I implemented the duration fields and addition of storyboard items from storyboard. Previously it could only be done from the timeline docker. Also I implemented updating of all affected items’ thumbnail. This makes the docker almost complete sans the capability to save or export.
The duration field is implemented such that any item in the storyboard docker has the duration equal to the next keyframe in any node. This makes sense because the canvas image would be identical to the keyframe image for that duration only, after that the other keyframe’s content would be added to it. Changing duration would move all keyframes in all nodes after the keyframe for that item.
Changing duration would move all keyframes after the keyframe for that item in all layers. So when we change duration for item with frame 0, all items after it move and so do the keyframes for those items.
Adding item from storyboard item would add an item after the duration for the current item, current item being the item on which RMB was clicked or the plus icon belongs to. There is an Add Storyboard Item Before option in the right click menu that would add an item just before the current item.
Thumbnails for all the affected items would be updated when a keyframe is changed.
I created two classes, KisStoryboardThumbnailRenderScheduler and KisAsyncStoryboardThumbnailRenderer which inherits KisAsyncAnimationRendererBase.
KisStoryboardThumbnailRenderScheduler stores queues of dirty/changed frames. It has two queues. One for the keyframes that are directly changed such as by painting on the canvas. The other queue has frames that have been affected by the changes. The first queue is given preference for rendering. These queues are updated whenever the image becomes idle. After that they are one by one rendered and a signal is emitted that contains the KisPaintDevice. The thumbnails are updated using the KisPaintDevice.
KisAsyncStoryboardThumbnailRenderer renders a single frame in another thread. This class is used by KisStoryboardThumbnailRenderScheduler to render frames.
If we change Layer 2 – frame 7, this would change items for frame 10 and frame 14 as they have keyframes in layer 1 and any changes to layer 2 – frame 7 would change the composite image for frame 10 and 14.
With all the major parts complete we are now ready to get these things tested. This is a shoutout to anyone interested in testing this feature out. If you are on a Linux system you can get the appimage from the following link.
This is the link to the appimage on google drive : link(google drive) (204M)
This is a testing guide that has brief info and directions : link (google doc)
You can leave any feedback or suggestions here or on the Krita-Artists post for this feature. If you come across any bug or crash or something more serious then please inform us at the Phabricator task for this feature.
This week I will look into how Krita saves file and write unit tests for saving and loading.