Bug 476076 - Masked brushes use pen pressure, even if pen pressure is disabled in the brush
Summary: Masked brushes use pen pressure, even if pen pressure is disabled in the brush
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 5.2.0
Platform: Microsoft Windows Other
: NOR minor
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: release_blocker
: 475591 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-10-25 08:06 UTC by Flo Tasser
Modified: 2023-11-03 16:50 UTC (History)
3 users (show)

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


Attachments
screenshot (402.73 KB, image/png)
2023-10-25 08:06 UTC, Flo Tasser
Details
gif of the behaviour (978.48 KB, image/gif)
2023-10-25 09:02 UTC, Flo Tasser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Flo Tasser 2023-10-25 08:06:24 UTC
Created attachment 162557 [details]
screenshot

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE

1) I have a simple brush, without any sensors on. No pressure for opacity or for flow.

2) The brush has a masked brush tip activated. But also, no pressure for opacity and flow. 

3) If I have the pressure in Krita globally disabled (I have the "Use Pen Pressure" Toggle in my custom toolbar) it paints with 100% opacity and flow (as I want to).

4) If I activate the global pressure sensitivity, even tho the brush is not supposed to use pressure, it still uses opacity and/or flow of my pen. Running Krita 5.2.0 on Windows. Tried on yesterdays nightly build, same results.

OBSERVED RESULT
The brush works with pressure, even though pressure sensitivity is disabled in all my brush settings that I can find. 
Additionally, if I activate the (under Masked Brush) "Opacity" option, but then in the Masked Brush Opacity options disable "Enable Pen Settings" it works. 

EXPECTED RESULT
The brush should just paint the same way as if I would paint with the mouse: completely disabled pressure all the time

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

ADDITIONAL INFORMATION
see my attached screenshot
Comment 1 David REVOY 2023-10-25 08:25:38 UTC
Hi, it might be a good idea to write here in the report the name of the brush-tip, if you can. 

I ask that, because some *.gih brush tips (Gimp animated brush tip) can map mulitple brush mask to pressure, rotation, or drawing angle. And Krita will honor that before any built-in curve based sensor. So, it might be the case with your brush tip.  

For more info about gih brushes: 
https://docs.krita.org/en/general_concepts/file_formats/file_gih.html#file-gih
https://docs.gimp.org/2.8/en/gimp-using-animated-brushes.html
Comment 2 Flo Tasser 2023-10-25 09:02:03 UTC
(In reply to David REVOY from comment #1)
> Hi, it might be a good idea to write here in the report the name of the
> brush-tip, if you can. 
> 
> I ask that, because some *.gih brush tips (Gimp animated brush tip) can map
> mulitple brush mask to pressure, rotation, or drawing angle. And Krita will
> honor that before any built-in curve based sensor. So, it might be the case
> with your brush tip.  
> 
> For more info about gih brushes: 
> https://docs.krita.org/en/general_concepts/file_formats/file_gih.html#file-
> gih
> https://docs.gimp.org/2.8/en/gimp-using-animated-brushes.html

Thank you for the idea David. Didn't think of that. But it was a custom brush tip in this example, generally it happens with other brushtips, too. They were all single images, not a .gih

Tested with some random animated bruth tips, same result.

It seems as if opacity and flow of the mask brush have nothing to do with the toggles. Will try to record a short video.

I'll append another screengrab, this time as a gif. Hope it makes sense.
Comment 3 Flo Tasser 2023-10-25 09:02:22 UTC
Created attachment 162559 [details]
gif of the behaviour
Comment 4 David REVOY 2023-10-25 09:04:55 UTC
I see, thank you for the "gif of the behavior" in attachement. It really shows the issue at works. I'll switch your bug report as "reported" because I can reproduce. 👍
Comment 5 David REVOY 2023-10-25 09:43:04 UTC
 > I'll switch your bug report as "reported" 

Correction: I meant 'confirmed' , I'll switch it.
Comment 6 Flo Tasser 2023-10-26 05:33:13 UTC
All good. Thank you. :) And thanks for asking better questions than I did, never easy to communicate these things well.
Comment 7 Dmitry Kazakov 2023-10-27 13:25:14 UTC
I think I can reproduce this issue...
Comment 8 Dmitry Kazakov 2023-10-27 13:32:09 UTC
*** Bug 475591 has been marked as a duplicate of this bug. ***
Comment 9 Dmitry Kazakov 2023-10-29 14:08:22 UTC
Git commit 5aeaa07087147084ab8b8d361c24266b4aad290b by Dmitry Kazakov.
Committed on 29/10/2023 at 15:07.
Pushed by dkazakov into branch 'master'.

Fix initialization of "Checked" and "Checkable" values for masked brush options

Basically, we now automatically deduce Checkable value depending on
the presence of the prefix for the option.

M  +17   -0    libs/image/kis_properties_configuration.cc
M  +7    -0    libs/image/kis_properties_configuration.h
M  +2    -2    plugins/paintops/colorsmudge/KisSmudgeRadiusOptionData.cpp
M  +6    -4    plugins/paintops/curvebrush/KisCurveStandardOptionData.h
M  +1    -1    plugins/paintops/defaultpaintops/brush/kis_brushop_settings_widget.cpp
M  +5    -11   plugins/paintops/hatching/KisHatchingStandardOptionData.h
M  +13   -14   plugins/paintops/libpaintop/KisCurveOptionData.cpp
M  +13   -8    plugins/paintops/libpaintop/KisCurveOptionData.h
M  +3    -2    plugins/paintops/libpaintop/KisFlowOpacityOption.cpp
M  +0    -1    plugins/paintops/libpaintop/KisFlowOpacityOption.h
M  +11   -0    plugins/paintops/libpaintop/KisKritaSensorPack.cpp
M  +17   -2    plugins/paintops/libpaintop/KisKritaSensorPack.h
M  +3    -1    plugins/paintops/libpaintop/KisScatterOptionData.cpp
M  +3    -5    plugins/paintops/libpaintop/KisSizeOptionData.cpp
M  +1    -1    plugins/paintops/libpaintop/KisSizeOptionData.h
M  +5    -5    plugins/paintops/libpaintop/KisStandardOptionData.cpp
M  +6    -7    plugins/paintops/libpaintop/KisStandardOptionData.h
M  +3    -9    plugins/paintops/sketch/KisSketchStandardOptionData.h

https://invent.kde.org/graphics/krita/-/commit/5aeaa07087147084ab8b8d361c24266b4aad290b
Comment 10 Dmitry Kazakov 2023-10-29 14:43:02 UTC
Git commit 77bc720926bf9d1255ca98a6f6b7309f8facd3ef by Dmitry Kazakov.
Committed on 29/10/2023 at 15:09.
Pushed by dkazakov into branch 'krita/5.2'.

Fix initialization of "Checked" and "Checkable" values for masked brush options

Basically, we now automatically deduce Checkable value depending on
the presence of the prefix for the option.

M  +17   -0    libs/image/kis_properties_configuration.cc
M  +7    -0    libs/image/kis_properties_configuration.h
M  +2    -2    plugins/paintops/colorsmudge/KisSmudgeRadiusOptionData.cpp
M  +6    -4    plugins/paintops/curvebrush/KisCurveStandardOptionData.h
M  +1    -1    plugins/paintops/defaultpaintops/brush/kis_brushop_settings_widget.cpp
M  +5    -11   plugins/paintops/hatching/KisHatchingStandardOptionData.h
M  +13   -14   plugins/paintops/libpaintop/KisCurveOptionData.cpp
M  +13   -8    plugins/paintops/libpaintop/KisCurveOptionData.h
M  +3    -2    plugins/paintops/libpaintop/KisFlowOpacityOption.cpp
M  +0    -1    plugins/paintops/libpaintop/KisFlowOpacityOption.h
M  +11   -0    plugins/paintops/libpaintop/KisKritaSensorPack.cpp
M  +17   -2    plugins/paintops/libpaintop/KisKritaSensorPack.h
M  +3    -1    plugins/paintops/libpaintop/KisScatterOptionData.cpp
M  +3    -5    plugins/paintops/libpaintop/KisSizeOptionData.cpp
M  +1    -1    plugins/paintops/libpaintop/KisSizeOptionData.h
M  +5    -5    plugins/paintops/libpaintop/KisStandardOptionData.cpp
M  +6    -7    plugins/paintops/libpaintop/KisStandardOptionData.h
M  +3    -9    plugins/paintops/sketch/KisSketchStandardOptionData.h

https://invent.kde.org/graphics/krita/-/commit/77bc720926bf9d1255ca98a6f6b7309f8facd3ef
Comment 11 Dmitry Kazakov 2023-11-03 16:49:36 UTC
Git commit 81161814ad4f646ae8c456a349128751d8e0b825 by Dmitry Kazakov.
Committed on 03/11/2023 at 17:49.
Pushed by dkazakov into branch 'master'.

Disable checkability of Opacity and Flow options for Masked Brushes

They were uncheckable before Krita 5.2.0, so we should keep them this
way. That is a proper fix for the incorrect fix for bug 476076.
Related: bug 476505

M  +1    -1    plugins/paintops/defaultpaintops/brush/kis_brushop_settings_widget.cpp
M  +2    -2    plugins/paintops/libpaintop/KisStandardOptionData.h

https://invent.kde.org/graphics/krita/-/commit/81161814ad4f646ae8c456a349128751d8e0b825
Comment 12 Dmitry Kazakov 2023-11-03 16:50:16 UTC
Git commit f49342bc1cc2bc968ae5b1176583716713aa6359 by Dmitry Kazakov.
Committed on 03/11/2023 at 17:49.
Pushed by dkazakov into branch 'krita/5.2'.

Disable checkability of Opacity and Flow options for Masked Brushes

They were uncheckable before Krita 5.2.0, so we should keep them this
way. That is a proper fix for the incorrect fix for bug 476076.
Related: bug 476505

M  +1    -1    plugins/paintops/defaultpaintops/brush/kis_brushop_settings_widget.cpp
M  +2    -2    plugins/paintops/libpaintop/KisStandardOptionData.h

https://invent.kde.org/graphics/krita/-/commit/f49342bc1cc2bc968ae5b1176583716713aa6359