Bug 394581

Summary: Changing brush option changes the pattern also
Product: [Applications] krita Reporter: Kenneth Evans <ken>
Component: Resource ManagementAssignee: Halla Rempt <halla>
Status: RESOLVED FIXED    
Severity: normal CC: halla, info
Priority: NOR    
Version First Reported In: 4.0.3   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Kenneth Evans 2018-05-22 22:13:48 UTC
Use Wet Paint as an example.  It has Pressure checked as an option.  If you click on Pressure you see no pattern selected.  The icon to the right is either blank or solid (probably blank, I can't tell).

Now uncheck Size and re-check it.  Now the brush has a pattern.  It didn't go back to the default.  If you now go to Pattern, the first pattern is selected (02 rough canvas) and there is a pattern shown to to the right.

This probably is true for all brushes with pattern checked by default.  And it happens when changing other options than Size.

There doesn't seem to be a way to deselect the pattern used (once it has decided to use one), except by unchecking Pattern.

It is unclear why pattern is checked.  But if it is checked, the pattern should be consistent when other parameters are changed.  I expect most users don't want this brush to have a canvas texture.  It only works "right" because there actually is _no_ pattern associated with it by default even though Pattern is checked.  If the pattern stayed that way when checking or unchecking size, that would be ok, I guess.
Comment 1 Halla Rempt 2018-05-23 07:26:56 UTC
That's probably a bug in the brush preset design. I'll ask David.
Comment 2 David REVOY 2018-05-23 08:07:24 UTC
Hi, 

I tried to reproduce with 4.0.3 appimage on Linux. It's not easy because you don't describe very well what you do. For example, when you write: "Use Wet Paint as an example.  It has Pressure checked as an option." ; I want to ask "Where with Wet-Paint preset? Please be more specific" because the preset has "Pressure" checked as an sub-option for three sensors: "Opacity", "Size", and "Smudge Length". Same when you write "If you click on Pressure you see no pattern selected."; if you click on "Pressure" nothing happens because to desactivate the "Pressure" option, you need to uncheck "Enable Pen Setting" or activate another sensor then the system will allow you to uncheck "Pressure".

So I tried to uncheck/recheck "Size" sensor ( or even other sensors ) and click to desactivate all Pressure, one pressure, change one options... all of that a bit randomly because the instruction were not clear. I kept checking "Pattern" panel at every action. I reseted ten time the brush to default, retried with other options... So far, it doesn't affect my options here. I have consistent "Pattern" options whatever I choose (eg. the Pattern option never fallback by itself to the texture "02 rough canvas") . 

@Kenneth Evans: Did you activate other options? Can you describe more accurate instruction to reproduce? I might have missed something...

Note about the flat texture:
This preset -Wet-Paint- use a flat "Pattern" as a texture and this is a choice by design. It is because I'm not happy with the way the default Opacity of the brush engine "Mix-Brush" premultiply on the final stroke and blend with the canvas color mixing. It is not subtle enough for what I wanted to achieve (at least, "it was" when I created this brush preset). By using an empty texture (gray square, named 'flathack') I could benefit to an higher extra level of opacity management ( originally coded for managing the textured holes in the Texture/Pattern).
Comment 3 Kenneth Evans 2018-05-23 14:55:53 UTC
I'll  try to be more more explicit:
1. Choose Wet Paint and open the options panel.
2. Look at Pattern under Texture.
3. Be sure the tag is set to Krita_4_Default_Resources.
      This makes a difference.
      It didn't happen when the filter was set to another tag.
          See below.
4. Set the brush to the default.
5. Look at Pattern under Texture.
   Nothing is selected.
   There is no name over the place where the pattern would show.
      If it has a flat pattern, there is no way to tell.
4. Uncheck size under General.
      (Focus goes to Size.)
5. Go back to the Pattern you looked at before.
      Now 02 rough canvas is selected and shows on the right.

Yesterday I did this many times and the pattern was always changed.  Today it is happening most of the time but not every time, so there is a lack of consistency.  Having the filter set to something besides Krita_4_Default_Resources may or may not have been the cause one time.  It has also worked "right" (not set a pattern) with the tag set to Krita_4_Default_Resources at least once this morning.

I repeat that most of the time it sets the Pattern to 02 rough canvas (for me).

To clarify: Size under General has Pressure selected.  It isn't really relevant.  Sorry.  For this example I am only looking at two options: Size under General and Pattern under Texture.  I do not check or uncheck Pattern, just look at it.  The only change I make is to check and uncheck Size.

In addition, I left it at Krita_4_Default_Resources when I closed Krita last night, and Pattern came up with a filter set to another tag today.  This is probably unrelated to the issue at hand, but I mention it for completeness.
Comment 4 David REVOY 2018-05-23 15:28:05 UTC
Ha thank you Kenneth Evans for the explicit guide. I could reproduce it on Krita 4.0.3 Linux appimage. I confirm everything you wrote.
Comment 5 Halla Rempt 2021-07-30 11:58:37 UTC
I can no longer reproduce this with a build from the master branch: I've checked a saved preset, and it does not have a pattern embedded.