Bug 362151

Summary: Onion skin not showing the previous image when creating a new key
Product: [Applications] krita Reporter: László Fazekas <mneko>
Component: AnimationAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: dimula73, jaquematealakalesi, mirakitty277
Priority: NOR    
Version: 5.2.2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description László Fazekas 2016-04-23 17:09:04 UTC
This is a new problem, it was not in the program before (1-2 weeks ago). This happens with the enabled onion skin. After you created a new keyframe, the image of the last keyframe (what you cut with the new empty keyframe) should become visible in the onion skin, but it's missing.

I think this is a caching problem, the program thinks it can use the same onion skin image after creating the new key.


Reproducible: Always

Steps to Reproduce:
1. create an animation layer
2. draw something on the keyframe
2. switch onion skin on
3. create a new keyframe on the next frame
4. you can't see the previous keyframe (what you cut with the new keyframe) in the onion skin
5. draw something and repeat 3-4 again. The previous keyframe is not visible, only the others.
Comment 1 Dmitry Kazakov 2016-05-04 09:10:24 UTC
Ok, it seems like it depends on the way a new frame is created. If it is created with a special "New Frame" button, then it works fine. In Lazy Frame mode it doesn't work.
Comment 2 Dmitry Kazakov 2016-05-04 09:19:59 UTC
*** Bug 362437 has been marked as a duplicate of this bug. ***
Comment 3 Dmitry Kazakov 2016-05-04 09:56:32 UTC
Git commit 77695fea234b1228adde30011b73d7457f3a45b7 by Dmitry Kazakov.
Committed on 04/05/2016 at 09:53.
Pushed by dkazakov into branch 'master'.

Add simple hashing to the keyframe channel

Now we can easily understand that the set of key frames has changed
in the paint device, therefore making our cache invalid
Related: bug 362437
Fixes T2413

M  +15   -0    libs/image/kis_keyframe_channel.cpp
M  +6    -0    libs/image/kis_keyframe_channel.h
M  +12   -1    libs/image/kis_onion_skin_cache.cpp

http://commits.kde.org/krita/77695fea234b1228adde30011b73d7457f3a45b7
Comment 4 László Fazekas 2016-05-04 13:08:33 UTC
Nice solution! I just tried the commit and it seems perfect. For this single problem maybe even the length of the list as a hash would be enough.