Bug 419462

Summary: Misaligned Onion Skin frames when image is cropped
Product: [Applications] krita Reporter: AE_2
Component: AnimationAssignee: Eoin O'Neill <eoinoneill1991>
Status: RESOLVED FIXED    
Severity: minor CC: emmetoneill.pdx, tamtamy.tymona
Priority: NOR    
Version: 4.2.9   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Misaligned Onion Skin frames when image is cropped.

Description AE_2 2020-03-31 19:20:12 UTC
Created attachment 127146 [details]
Misaligned Onion Skin frames when image is cropped.

SUMMARY
(May be the same as or similar to bug# 395891 from a previous version?)
While having multiple frames of animation on a layer, I crop a section of screen to render a specific area. The frames I'm *NOT* currently on in onion skin mode appear misaligned from the current frame. All it takes to correct this is to scrub the time slider, but it would be handy to have this fixed.


STEPS TO REPRODUCE
1. Create 2 or more frames of animation on a single layer
2. Turn on onion skin mode on the layer
3. Use crop tool to crop a section of animation

OBSERVED RESULT
Current frame is cropped correctly. Other frames (shown in onion skin) appear misaligned and therefore usually cut off. When another frame is selected they realign themselves properly.

EXPECTED RESULT
Onion skin frames should appear properly aligned with current frame when cropped.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Tiar 2020-03-31 19:29:08 UTC
I told @AE_2 on reddit to make another bug report instead of adding to bug 395891, because I believe it's a different issue, and while this bug report is a genuine bug report, the other one is a wish item.

Marked confirmed because I mentioned it in the bug 395891 for 4.1.0 beta and I don't think there were any changes to onion skins from that point. It might be also relevant to bug 405753.
Comment 2 Emmet O'Neill 2020-04-13 20:02:40 UTC
Also confirming. "It seems to resolve when a new cache is generated, we probably just need to refresh the cache after cropping." - Eoin
Comment 3 Eoin O'Neill 2020-05-07 00:54:42 UTC
Git commit 2446ca4e78b627edbacb922fc1dc345622d12f0a by Eoin O'Neill.
Committed on 07/05/2020 at 00:53.
Pushed by eoinoneill into branch 'master'.

Onion Skin Alignment After Image Crop Fix

Onion Skin Cache needs to be flushed after running image processes on
multiple frames.

M  +4    -0    libs/image/kis_paint_layer.cc
M  +7    -0    libs/image/kis_paint_layer.h
M  +20   -6    libs/image/kis_processing_applicator.cpp
M  +1    -0    libs/image/kis_processing_applicator.h

https://invent.kde.org/kde/krita/commit/2446ca4e78b627edbacb922fc1dc345622d12f0a
Comment 4 Halla Rempt 2020-05-07 06:50:09 UTC
Git commit cc72dc512e77b4b2cecee8427f44131aee309926 by Boudewijn Rempt, on behalf of Eoin O'Neill.
Committed on 07/05/2020 at 06:48.
Pushed by rempt into branch 'krita/4.3'.

Onion Skin Alignment After Image Crop Fix

Onion Skin Cache needs to be flushed after running image processes on
multiple frames.
(cherry picked from commit 2446ca4e78b627edbacb922fc1dc345622d12f0a)

M  +4    -0    libs/image/kis_paint_layer.cc
M  +7    -0    libs/image/kis_paint_layer.h
M  +20   -6    libs/image/kis_processing_applicator.cpp
M  +1    -0    libs/image/kis_processing_applicator.h

https://invent.kde.org/kde/krita/commit/cc72dc512e77b4b2cecee8427f44131aee309926