| Summary: | Animation cache not updating after layer opacity change | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | cromachina |
| Component: | Animation | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | emmetoneill.pdx |
| Priority: | NOR | ||
| Version First Reported In: | 5.2.6 | ||
| Target Milestone: | --- | ||
| Platform: | NixOS | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/graphics/krita/-/commit/dc8734f1cf8c3d4bcdc2237148279743b6150ae3 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
cromachina
2025-02-01 16:55:25 UTC
Confirming this, thank you for the report, cromachina. Note: This bug is referring to a general layer opacity change on any raster animated later, and not animated opacity parameter changes via the curves docker. Also, a second workaround is to right click on the timing header (the ruler section with the numbers in it above the frame view grid), and select "Clear Cache". This forces the animation cache to be entirely regenerated. Git commit b7ed819bee73f9f8fc3207dd67154b8a401ce51e by Emmet O'Neill. Committed on 20/06/2025 at 21:00. Pushed by emmetoneill into branch 'master'. BUGFIX: Static opacity changes now properly clear animation cache. Note: This fix is referring to the changing of the general layer opacity of a RASTER animated layer, NOT a layer with scalar/curves opacity animation. This bug fixes an issue where if the user changes the overall layer opacity of a layer with multiple drawn frames of RASTER animation, the cache would only be invalidated for 1 of the frames, despite non-animated layer opacity being something that should apply to all frames equally. Now chaging the opacity will invalidate the entire animation cache, so that layer opacity changes will be immediately reflected as expected. HACK: As noted in the comment, this fix is something of a hack, as the frames are being invalidated directly within the KisNodeOpacityCommand. A better fix would be to slightly refactor KisNode::setDirty, KisImage::requestProjectionUpdate, and/or KisProjectionUpdateFlags, to handle more variations of cache invalidation behavior. M +6 -0 libs/image/commands/kis_node_opacity_command.cpp https://invent.kde.org/graphics/krita/-/commit/b7ed819bee73f9f8fc3207dd67154b8a401ce51e Git commit dc8734f1cf8c3d4bcdc2237148279743b6150ae3 by Emmet O'Neill. Committed on 20/06/2025 at 21:11. Pushed by emmetoneill into branch 'krita/5.2'. BUGFIX: Static opacity changes now properly clear animation cache. Note: This fix is referring to the changing of the general layer opacity of a RASTER animated layer, NOT a layer with scalar/curves opacity animation. This bug fixes an issue where if the user changes the overall layer opacity of a layer with multiple drawn frames of RASTER animation, the cache would only be invalidated for 1 of the frames, despite non-animated layer opacity being something that should apply to all frames equally. Now chaging the opacity will invalidate the entire animation cache, so that layer opacity changes will be immediately reflected as expected. HACK: As noted in the comment, this fix is something of a hack, as the frames are being invalidated directly within the KisNodeOpacityCommand. A better fix would be to slightly refactor KisNode::setDirty, KisImage::requestProjectionUpdate, and/or KisProjectionUpdateFlags, to handle more variations of cache invalidation behavior. (cherry picked from commit b7ed819bee73f9f8fc3207dd67154b8a401ce51e) M +6 -0 libs/image/commands/kis_node_opacity_command.cpp https://invent.kde.org/graphics/krita/-/commit/dc8734f1cf8c3d4bcdc2237148279743b6150ae3 |