Stacked Brushes paint engine
OpenPublic

Mock History

Current Revision

Mock Description

This is a try to allow stacked brush engine solve both user histories: 1) combine brush engines and 2) use multiple brushes for clipping

Side notes:

  1. The main difference from the previous proposals is that the stacked brush is not a brush engine in its classical view. Every brush engine can have other engines stacked onto it.
  2. The user can select any brush preset and stack other presets onto it. After stacking at least one preset on the top of the current one, additional controls appear that allow the user to switch between "internal" presets.
  3. Previous versions of Krita will see such presets as a usual preset with one (first) brush (disputable?)
  4. Technically it will be implemented as a usual brush engine, which is just hidden from the engines list. Instead, paintop editor recognizes such presets and allows the user to switch between them.
  5. The size of the paintop editor does not change! The controls reuse the space occupied but the brush name text field.
  6. Most of the @rempt's code and controls are reused (KisStackedPaintOp and StackedView). It just changes the way how these controls are shown in the GUI.
dkazakov created Stacked Brushes paint engine.Oct 16 2016, 9:11 AM
dkazakov added an image: base.png.
dkazakov added a task: Restricted Maniphest Task.
dkazakov added a subscriber: scottpetrovic.
nharmony added a comment.EditedOct 16 2016, 11:04 AM

I really like this proposal. Its looks like something i'd enjoy using as an artist. I prefer how the stack is an "addon" available throughout the current engines, rather than being its own separate (visible) brush engine.

You say previous versions of krita will only recognize the first brush in the stack. I guess this means that whenever you save a stacked brush, it will be saved under whatever engine is selected first in the stack?

It says "add stack to current" so i'm guessing thats right.

You say previous versions of krita will only recognize the first brush in the stack. I guess this means that whenever you save a stacked brush, it will be saved under whatever engine is selected first in the stack?

Yes it is saved under the category of the first preset in the stack

It says "add stack to current" so i'm guessing thats right.

@timotheegiet suggested on IRC that "add stack to the current" should not overwrite the current preset, but create a copy of it and add a stack into it. That is perfectly doable.

scottpetrovic added a comment.EditedOct 16 2016, 2:35 PM

neat direction adding brushes to existing brushes. The updated UI proposal has two issues that I think can be solved.

  1. How do you get "out" of this mode. When you are in "brush #2" for example, everything from the presets to the brush engines change how they function.
  1. It isn't very clear UI wise what is going on. You change something deep in the settings, but it changes things much higher up in the visual hierarchy. It becomes easy to get "lost" on where you currently are, or how to get out of it.

I think for both points, we probably need to move the name and all of the stacking options to the very top of the editor. Even above the brush engines. This way when you are switching presets and modes, it is easy to see that stacked brush #3 means everything below.

I think we also need some way to go "in and out" of this mode. Maybe a "Enter Stacked Brush Mode" and "Leave Stacked Brush Mode".

Leaving this mode will turn the brush editor back and selecting presets will mean "actually" changing to a different preset -- not having to do with stacked brushes. When "Stacked Brush Mode" is off, we should hide the left and right arrows. Maybe give a label that says that it is using 3 brushes.

Since selecting a preset can now mean two different things, we need to be clear on what it means.

On another note... I started a branch doing some GUI stuff with the brush editor. My changes might fit in well with what Dmitry is doing. Merging might become an issue if we do our own thing in separate branches.

Hi, @scottpetrovic!

  1. How do you get "out" of this mode. When you are in "brush #2" for example, everything from the presets to the brush engines change how they function.
  1. The preset editor works in two modes: Normal Mode and Pick Mode
  2. In Normal mode the settings of the currently activated preset are edited
  3. In Normal mode clicking on a preset icon or changing the brush engine switches the toplevel preset (that is the stacked brush itself).
  4. In Pick mode changing the preset or a brush engine switches the child preset of the stacked brush
  1. Pick mode is entered by clicking on a "checkable" button [1]
  2. Pick mode is exited by either:
    • unchecking the button
    • closing the editor popup
    • pressing save or revert buttons
    • changing any property of the current prest

[1] - Pick mode button:

  1. It isn't very clear UI wise what is going on. You change something deep in the settings, but it changes things much higher up in the visual hierarchy. It becomes easy to get "lost" on where you currently are, or how to get out of it.

There are only two modes. And when you are in the Pick mode, the Stacked brush name becomes disabled and therefore grayscale. We can add some more visual feedback for it.

I think for both points, we probably need to move the name and all of the stacking options to the very top of the editor. Even above the brush engines. This way when you are switching presets and modes, it is easy to see that stacked brush #3 means everything below.

I'm ok with it.

I think we also need some way to go "in and out" of this mode. Maybe a "Enter Stacked Brush Mode" and "Leave Stacked Brush Mode".

I guess my first comment should answer this question.

Leaving this mode will turn the brush editor back and selecting presets will mean "actually" changing to a different preset -- not having to do with stacked brushes. When "Stacked Brush Mode" is off, we should hide the left and right arrows. Maybe give a label that says that it is using 3 brushes.

The arrows are visible for all the presents that have at least two brushes in the stack in both Normal and Pick modes. That is, you can switch the current preset of the stack without entering any special mode.

Since selecting a preset can now mean two different things, we need to be clear on what it means.

That is why there are two different modes :)

Have my comments clarified the issues for you?

nharmony added a comment.EditedOct 18 2016, 12:55 PM

@dkazakov pick mode make sense to me at least.

Question, when you add stack to a current preset, you get brush_copy,( to be non-destructive),but wouldn't the other presets you add to that brush also have to be copies?

Hi, @nharmony!

Question, when you add stack to a current preset, you get brush_copy,( to be non-destructive),but wouldn't the other presets you add to that brush also have to be copies?

Yes, other embedded presets should be literally embedded into this one. So they are "physical" copies that are stored inside the parent preset.

nharmony added a comment.EditedOct 18 2016, 5:58 PM

yeh, i like that scott. I think the word "stack" or "stacked" should be seen though.

+add stack to preset and edit brush stack (3)

thoughts?