Bug 432274 - [Brush editor] [Stamp creator] Colored stamp creation is broken
Summary: [Brush editor] [Stamp creator] Colored stamp creation is broken
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 4.4.2
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-01-29 12:12 UTC by David REVOY
Modified: 2021-02-01 07:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
^ webm video of the bug (335.86 KB, video/webm)
2021-01-29 12:12 UTC, David REVOY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2021-01-29 12:12:33 UTC
Created attachment 135279 [details]
^ webm video of the bug

Hi,
Here is a bug reported by Jennifer Rich under my video about brush tip creation ( https://www.youtube.com/watch?v=fgA4BcO3Nq8&lc=UgzUcdgn6rS3Wzixfhp4AaABAg , with Krita 4.4.1 on Win10 ). 

I could reproduce this bug with Krita 4.2.2appimage on Linux.

To reproduce:
=============
- Create a new document, make it fully transparent
- Paint two or three blobs of colors
- Square select the blobs
- Press Ctrl+C
- Open the brush editor, and in a pixel-engine based preset, try to add the blobs selected as a new brush tip (with colors). (Brush Tip > Predefined tab > "+Stamp" button). Uncheck "Create mask from color" to get the colored tip. 

Result:
=======
The brush tip keeps in black and white (check the preview) and the option seams to be invalid or broken (also, I never really understood "Create mask from color" terminology, a tooltip for more information would be welcome). All in all, the brush stamp created return grayscale in both cases.

Workaround:
===========
If one tweak the drop down menu under (unfolding "Regular" list) the panel got a refresh and suddently the colored stamps preview appears and can be created. (see the webm video in attachement).
Comment 1 Halla Rempt 2021-01-29 12:22:38 UTC
Yes, I can confirm the issue.
Comment 2 Halla Rempt 2021-01-29 12:25:31 UTC
Looks like 

commit df677d7033432f5b216dc50fcbe655e2d20f027f
Author: Dmitry Kazakov <dimula73@gmail.com>, Mon Aug 10 13:09:49 2020 +0300 (6 months ago)
Committer: Dmitry Kazakov <dimula73@gmail.com>, Mon Aug 10 13:33:03 2020 +0300 (6 months ago)
Follows: v4.3.0-prealpha
Branches: <Expand>

Fix mess with brush modes (and fix KisImagePipeBrushTest::testColoredDab())

1) Remove `useColorAsMaskSwitch()`. `brushApplication() != IMAGESTAMP`
   should be used instead.

2) Remove explicit tracking of hasColor(). Now hasColor() is equal
   to `brushType() == IMAGE || brushType() == PIPE_IMAGE`.

3) `brushType()` now only tracks the format of the brush. Is it not
   used for selecting between `brush->mask()` or `brush->paintDevice()`.
   For this choice one should use `brushApplication()` now.

caused the problem.
Comment 3 Dmitry Kazakov 2021-02-01 06:24:25 UTC
Git commit 7e07908226e9d44293e4c8d80d5e8bee6fefdecd by Dmitry Kazakov.
Committed on 01/02/2021 at 06:23.
Pushed by dkazakov into branch 'master'.

Fix Color as Alpha and Preserve Alpha in Custom and Clipboard brushes

The checkboxes has been broken during the lightness/gradient
refactoring.

M  +19   -10   plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp
M  +1    -0    plugins/paintops/libpaintop/kis_clipboard_brush_widget.h
M  +5    -10   plugins/paintops/libpaintop/kis_custom_brush_widget.cpp

https://invent.kde.org/graphics/krita/commit/7e07908226e9d44293e4c8d80d5e8bee6fefdecd
Comment 4 Dmitry Kazakov 2021-02-01 07:51:48 UTC
Git commit cf3b3bdecd73d55c938227360f92c7ff28f61d79 by Dmitry Kazakov.
Committed on 01/02/2021 at 07:51.
Pushed by dkazakov into branch 'krita/4.3'.

Fix Color as Alpha and Preserve Alpha in Custom and Clipboard brushes

The checkboxes has been broken during the lightness/gradient
refactoring.

M  +23   -12   plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp
M  +1    -0    plugins/paintops/libpaintop/kis_clipboard_brush_widget.h
M  +5    -4    plugins/paintops/libpaintop/kis_custom_brush_widget.cpp

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