SUMMARY According to this topic (https://krita-artists.org/t/animation-and-tools/10406/2?u=grum999): "is only possible with a workaround using transform mask. Move frames to another layer, add transform mask, merge. If it loses frames, please do complain to me since it’s the main workaround and it must be working correctly." The workaround don't work properly. STEPS TO REPRODUCE 1. Create an animated layer 2. Duplicate layer 3. On duplicated layer, select frames and shift them to right 4. On duplicated layer, add a sub-layer 'transform mask' 5. With tranform mask, do (for example) a translation 6. Flatten the duplicated layer OBSERVED RESULT 1. An unexpected keyframe has been created (frame #1) with unexpected content 2. Some frames contains some unexpcted content EXPECTED RESULT When layer is flattened: 1. Defined keyframes must not change 2. Content of flattened layer must match content of unflattened layer SOFTWARE/OS VERSIONS Windows: - macOS: - Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Created attachment 130568 [details] Before layer has been flattened
Created attachment 130569 [details] Result after layer has been flattened
I can confirm this for the 4.3.0 and 5.0.0 Aug01 prealpha (git a72eb74) appimages on Debian 10. It's not neccessary to shift the duplicated layer frames to the right. The artifacts appear for a transformed non-shifted duplicate or for a transformed original layer. The artifacts are fragments of past or future frames. They are permanent parts of the image. They are created by the layer flattening operation.
I was concentrating on the artifacts in Comment 3. I also see the spurious keyframe at frame-0 which is a copy of the first frame of the original layer, usually with a part missing. After shifting frames, a blank keyframe is created at frame-0 and this can not be removed. The layer flattening operation creates the spurious content of frame-0 which then is a not-empty keyframe. Again, a duplicate layer is not needed. This happens for a frames shift and transform of the original layer followed by layer flattening.
This bug report is somewhat of a high priority because this is the only way to move/transform multiple frames at once. Merging down later is important (to be able to transform later, too, or to be able to just transform some keys and then go back etc.), and it shouldn't introduce any artifacts.
We've changed some of the way merging animated content works and it seems like it may have resulted in this being fixed. I've tried to reproduce it on a handful of test files in my collection and can't seem to get the artifacts anymore. If you come across this error again, please save, reopen this issue, and submit a example file!