Bug 446088 - Gradient Map in both Smudge and Pixel engine stopped working for a brush tip
Summary: Gradient Map in both Smudge and Pixel engine stopped working for a brush tip
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords: regression, release_blocker
Depends on:
Blocks:
 
Reported: 2021-11-25 19:31 UTC by Tiar
Modified: 2021-11-30 14:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2021-11-25 19:31:43 UTC
SUMMARY
For some reason the Gradient Map always paint in red. It might be either Resource Management issue or brush engines issue.

STEPS TO REPRODUCE
1. Select any brush with RGBA brush tip.
2. Change the mode to Gradient Map.

OBSERVED RESULT
See that the brush now paints in red.

EXPECTED RESULT
It should use the current gradient to paint.

SOFTWARE/OS VERSIONS
Krita

 Version: 5.1.0-prealpha (git 09a2cb2)
 Languages: en_US, en, en_US, en, en_US, en, pl_PL, pl, pl_PL, pl
 Hidpi: true

Qt

  Version (compiled): 5.11.1
  Version (loaded): 5.11.1
Comment 1 Bug Janitor Service 2021-11-25 23:08:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1178
Comment 2 Bug Janitor Service 2021-11-30 13:41:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1188
Comment 3 Dmitry Kazakov 2021-11-30 14:38:01 UTC
Git commit 821d5fc83bc5eb93426c40324ebf98e89b75d85d by Dmitry Kazakov.
Committed on 30/11/2021 at 14:34.
Pushed by dkazakov into branch 'master'.

Fix brushes working in Gradient Map mode

The problem was introduced by the brush caching patchset. The problem
is that the cache may be dependent on the canvas resources, so it should
either be reset when cloning into the "fully defined state" or set to the
pre-generated one.

M  +20   -1    libs/image/brushengine/kis_paintop_preset.cpp
M  +8    -1    libs/image/brushengine/kis_paintop_preset.h
M  +37   -0    libs/image/brushengine/kis_paintop_settings.cpp
M  +2    -0    libs/image/brushengine/kis_paintop_settings.h
M  +1    -0    libs/resources/KoCanvasResourcesIds.h
M  +10   -0    libs/resources/KoResourceCacheInterface.cpp
M  +25   -0    libs/resources/KoResourceCacheInterface.h
M  +14   -3    libs/ui/KisPresetShadowUpdater.cpp
M  +10   -2    libs/ui/tool/kis_resources_snapshot.cpp

https://invent.kde.org/graphics/krita/commit/821d5fc83bc5eb93426c40324ebf98e89b75d85d
Comment 4 Dmitry Kazakov 2021-11-30 14:38:30 UTC
Git commit bd131c134632bf47951d0075282b1d55e34a1493 by Dmitry Kazakov.
Committed on 30/11/2021 at 14:38.
Pushed by dkazakov into branch 'krita/5.0'.

Fix brushes working in Gradient Map mode

The problem was introduced by the brush caching patchset. The problem
is that the cache may be dependent on the canvas resources, so it should
either be reset when cloning into the "fully defined state" or set to the
pre-generated one.

M  +20   -1    libs/image/brushengine/kis_paintop_preset.cpp
M  +8    -1    libs/image/brushengine/kis_paintop_preset.h
M  +37   -0    libs/image/brushengine/kis_paintop_settings.cpp
M  +2    -0    libs/image/brushengine/kis_paintop_settings.h
M  +1    -0    libs/resources/KoCanvasResourcesIds.h
M  +10   -0    libs/resources/KoResourceCacheInterface.cpp
M  +25   -0    libs/resources/KoResourceCacheInterface.h
M  +14   -3    libs/ui/KisPresetShadowUpdater.cpp
M  +10   -2    libs/ui/tool/kis_resources_snapshot.cpp

https://invent.kde.org/graphics/krita/commit/bd131c134632bf47951d0075282b1d55e34a1493