Change behavior of "E" button for eraser mode.
AbandonedPublic

Authored by abrahams on Nov 16 2015, 8:16 AM.

Details

Reviewers
woltherav
rempt
Group Reviewers
Krita
Summary

The basic idea is that pressing E will toggle between an eraser brush
and an ordinary brush. This is different from the current behavior,
which toggles the paintop from eraser mode and an ordinary mode. Many
users express desire for functionality like this.

The main mechanism is in KoToolManager. If eraser mode is on, it
always selects the tool for QTabletEvent::Eraser. KisPaintopBox
does a coordinated override for the current paintop as well.

Diff Detail

Repository
R37 Krita
Branch
eraser
Lint
No Linters Available
Unit
No Unit Test Coverage
abrahams updated this revision to Diff 1304.Nov 16 2015, 8:16 AM
abrahams retitled this revision from to Change behavior of "E" button for eraser mode..
abrahams updated this object.
abrahams edited the test plan for this revision. (Show Details)
abrahams added reviewers: rempt, woltherav.
abrahams updated this object.Nov 16 2015, 9:49 AM
rempt edited edge metadata.Nov 17 2015, 8:40 AM

I sort of like this approach... It's a bit scary, though, since we're essentially lying about the input device the user is using!

abrahams added a comment.EditedNov 18 2015, 9:17 PM

I like the general idea too, the problem with the patch is "remembering" the old device in a nice, safe way. Right now, if you put the tablet in its stand, press the "E" button, you switch to the eraser. But if you press "E" again, you don't go back to the tablet pen device, you go back to the mouse device. That means there will have to be some sort of state recording the last-used current device. There's also no way to have eraser mode save on a per-canvas basis. So, my conclusion is CanvasResourceProvider will have to be involved.

If we record and validate the state I think this method could be executed in a correct, less-scary way. It's a bit annoying KisPaintopBox tries to read the tool ID and so on, because that makes encapsulating the "lie" difficult. Maybe a small refactoring of that class would help make sure we can do the substitution in one single place.

abrahams updated this revision to Diff 1439.Dec 3 2015, 1:50 AM
abrahams updated this object.
abrahams edited edge metadata.
  • More changes to eraser.

This is very close to being finished. I am having trouble getting the erase mode button to higlight correctly when I have multiple canvases. When I switch from one canvas to the other, the state of the eraser mode button doesn't change. :(

abrahams updated this object.Dec 3 2015, 1:52 AM
abrahams updated this revision to Diff 1440.Dec 3 2015, 5:18 AM
abrahams updated this object.
  • Make eraser mode per-window

This is the same as horizontal mirror, preserve alpha, etc. and it
doesn't seem there is a way to handle these in general.

abrahams updated this revision to Diff 1444.Dec 4 2015, 5:09 AM

Make the right incantations and sacrifices to appease the KoToolManager

Ahhh it works so beautifully on my surface! Finally a reliable way to set the default eraser tool.

rempt added a comment.Dec 10 2015, 7:44 AM

I still find it sort of weird (but also liberating) that we can do krita-specific things like adding setEraserMode to KoToolManager... Building it now, but it probably won't be done before I reach Amsterdam.

rempt added a comment.Dec 10 2015, 8:00 AM

Hm, I just tested with just a mouse, and pressing E does change the erase button, but not the blending mode, and it also doesn't select an eraser preset, so nothing really changed.

Hi,
I have a big problem with this proposal:
Quickly alternate between normal and erase mode for the same preset is a very important part of the workflow I use and teach.
And while you've heard some users complaining, I've heard a lot that were very happy to can do this.

So please, don't remove that feature! Either make it an option (not activated by default) to select a user-defined eraser preset instead.

Or even better, if we had a way to assign shortcuts to presets, that would solve this usecase and several others at the same time.

abrahams added a comment.EditedDec 10 2015, 11:10 PM

Hi,
I have a big problem with this proposal:
Quickly alternate between normal and erase mode for the same preset is a very important part of the workflow I use and teach.
And while you've heard some users complaining, I've heard a lot that were very happy to can do this.

So please, don't remove that feature! Either make it an option (not activated by default) to select a user-defined eraser preset instead.

Or even better, if we had a way to assign shortcuts to presets, that would solve this usecase and several others at the same time.

Quickly alternate between erase and other op has not been removed, although it doesn't have a preset by default with this patch and is not connected to the UI anymore, the new action "Toggle erase op" can be bound to a shortcut in the configuration menu

In D549#12249, @rempt wrote:

Hm, I just tested with just a mouse, and pressing E does change the erase button, but not the blending mode, and it also doesn't select an eraser preset, so nothing really changed.

It should be the same as flipping your tablet pen over, if you are in erase mode and select a different brush / paintop, then press E again, will you toggle between the two brushes?

There does seem to be something wrong with the eraser mode when using the mouse only, I will update with fix when I figure it out.

Ok, the old shortcut is still there, so I'm a bit less afraid.

Still, I see some points making this change not the best way to integrate this feature:

-what about the "Eraser switch size" option? it will become very confusing...

-what about the "switch to previous preset" shortcut ( / ) ? This feature is quite exactly meant for the same usecase as yours, that is switching between two different presets.
(mostly used to switch to a different preset for eraser, but also cover more possibilities).

I believe it would be much more clever to upgrade the "switch to previous preset" with what you want to add here, making it easier to use with two proper slots (I admit I rarely use the / shortcut now because it's not simple to select different "1st" preset while keeping same "2nd" preset... ).

Do you see what I mean? Wouldn't it make more sense to add it there to improve very similar existing feature and not conflict with others?

addition to my last comment:
maybe also in this case, add a toolbar button next to eraser button to switch between 1st and 2nd preset... This way both are as much discoverable and easy to use.

Deevad added a subscriber: Deevad.Dec 11 2015, 2:17 PM

Hi, on this topic, I keep switching between the three method Krita offer right now:
I keep switching because the three method have pros and cons, and by the end not a single makes me happy as a end solution. (but I love to get this amount of workaround available)

1) toggle with a previous (eraser) preset with '/' :
pro: allows to toggle any type of preset
cons: no visual feedback, easy to break the toggle loop when selecting a third preset for a second. Rely on memory.

2) 'e' eraser :
pro: simple, switch blending mode to 'eraser' makes predictable results. Good while speedpainting. key toggle (set 'on' eraser mode, but also turn 'off' eraser mode)
cons: Bad with tiny brushes when drawing; drawing a 1px line is nice, erasing with a 1px is a lost of time.

3) 'e' to have a dedicated size. ( checkbox in brush editor )
pro: Allows to fix problems of the simple 'e' eraser mode with a dedicated size, and activate it on demand.
cons: This size affect all presets in eraser modes. All 'eraser' remains at the same size. This is a global size value totally non exposed to user interface.

...So, what about the fix proposed here (to switch another device with the 'E' key and switch to eraser blending mode, as when flipping stylus) ?
Adding 'e' to switch device is problematic, and brings regressions:
With it, the feature "change the blending mode and not the shape/size/opacity" would disapear.
With it, the feature "'e' to have a dedicated size ( checkbox in brush editor ) " would have no more effect, and be obsolete.
With it, the feature " toggle with a previous (eraser) preset with '/' " would be a sort-of-duplicate feature, and have no reason to continue to exist.
...But! It's also a step forward to unify and clean the 'Eraser' issue :
It's consistent with flipping the stylus.
User can put any preset shape/size/opacity on it, and toggle.

A proposal?
Not something 100% solving everything unfortunately:
'e' key: trigger "switch to eraser device".
On this device, the *.kpp preset loaded should be the same as selected with "Stylus tip device" + blending mode "eraser".
This 'eraser' device should be able to only 'erase'.
Remove "'e' to have a dedicated size ( checkbox in brush editor ) " and replace it with a user custom 'Size in Eraser mode' for each preset ( a slider in brush-editor ) expressed in percent of the actual brush size. (default 100%).
The option 'Temporary Save Tweaks to Presets' can temporary save 'Size in Eraser mode'


(pro) speedpainting preset can use a eraser 100% size the painting size. Small inking brush can have a bigger size saved inside the *.kpp, and adjusted by brush preset maintainer for an out-of-the-box good erasing setup experience.
(cons) User can't erase with another *.kpp preset ( eg. paint with a square, and toggle 'e' to erase with a airbrush like preset )

I'm curious to read your input on this thread.
The problem is interesting. We need mainy brains on this. Thanks for reading.

Thanks for your comment deevad, interesting.

I like the idea to replace "Eraser switch size" with a "Size in Eraser mode" for each preset (we need to define a maximum %, but that is not a problem..).
Though it doesn't cover the case when you want to switch to a different preset (for 100% opacity eraser or any other difference..).

What do you think about my proposal to improve the / shortcut, similar to what abrahams wanted to do for e:
-make it switch between two presets slots
-add a button next to erase button in the toolbar showing the / state (preset 1 or 2)

with those two ideas, we could improve both methods, that would be a great improvement without real regression.

@timotheegiet: Any improvements for the '/' preset switcher are welcome :)
Do you know the Mypaint 'X' key color history on-canvas carousel ?
This one is my ideal in term of ergonomy and can have up to 5 history slots with a single key, do the toggle previous/next, and have a good UX feedback.

abrahams added a subscriber: tpaulssen.EditedDec 11 2015, 7:17 PM

Thanks for the input @timotheegiet and @Deevad. I'll share my own thoughts about the method.

1. Consistency with other applications
I think this may be the strongest single reason to change the behavior. Most users just find Krita's way of doing things confusing, and ultimately having "E" be limited to switch blend mode is basically less powerful than the new behavior (I will get back to that in the next point), so they're not necessarily gaining anything by learning the different workflow. This patch makes Krita more consistent with other popular graphics applications. I don't think this is going to drive away any of Krita's existing dedicated user base, it shouldn't be a significant pain for most people. However for the many people who are trying out Krita for the first time, my interactions have repeatedly shown they would prefer the eraser is more similar to other applications.

2. New behavior is more powerful.
If you want to set your eraser preset to be the same as the brush preset, but simply changing the blending mode and size, you can do that too, the difference is simply that you select an erase op. This new way allows you to also customize the brush as well. You lose out on the ability linking the size & brush of the erase/draw paintops together, but you gain the ability to set each one arbitrarily as individual settings. Although the use case of keeping a single brush and changing the size makes plenty of sense, I personally find changing the brush itself more natural.

At the very least it can't be said the current way is unambiguously better, or that this represents some sort of regression instead of merely a breaking change.

In my opinion this change is in the spirit of Krita's freedom to make the application behave the way you want. The new behavior for "E" is very nearly replicating what we do already when flipping over the stylus, so Krita already sanctions this way of doing things to an extent. It is also "simpler" in the sense you don't have to explain as much. Just tell users pressing E now does the same thing as flipping your stylus over. [1]

3. The eraser is special.
I think we can agree that having special eraser functionality is critical to most people's workflow. But as I argued above, many users find that an eraser should be able to be customized more than simply choosing a different blending mode and size.

The new way would allow users choosing not just a different blending mode, or even a different paintop, but allows you to pick an entirely different tool. I think this is something that @Deevad's proposal loses, and for certain specalized users this could be quite useful. For example, a user may want to draw with the freehand path tool and erase with the brush tool. This behavior is already supported by flipping the stylus over, but now it can be done with a keyboard shortcut too. Another benefit, related to the third point: suppose a user wants to use a fill tool for their eraser. Instead of selecting erase blending mode by flipping the stylus and awkwardly going through the dropdown menu with the eraser button, they can just press "E" and choose their paintop like usual.

4. Edit the eraser without physically flipping your stylus.
This was what got me started writing the patch, and is motivated by using Krita on the Surface Pro 3. The problem is described elsewhere in more detail, but the basic issue is that you can press the eraser mode button on the pen to do erasing when the tip is pressed down, but you can't switch to eraser mode by hovering. This makes choosing an eraser preset very difficult if not impossible, without redesigning Krita's entire tablet handling code specifically for the Surface Pro 3 case. This feature makes editing the preferences of the eraser possible on that device.

This is not limited to the Surface Pro 3 however. Many users want to take advantage of the convenience of setting their eraser without having to actually manipulate the stylus and hover it over the tablet, and find pressing a keyboard shortcut to do that more convenient. This is how I edit my erasers in Photoshop, and it is also what motivated @tpaulssen to give this patch a thumbs up token.

5. Krita 3 is a time to make other breaking changes.
There will now be a dropdown menu where users can select "Classic Krita shortcuts" or "New Krita shortcuts. This could also perhaps include "PS style" shortucts. This is an opportunity to rework and rethink all of Krita's shortcuts. There was some intial discussion here back in October: T948. I will move the discussion to the mailing list and forums soon. The point is that there could be several things we potentially want to change, so if we move forward with that, the fact that this particular change would break workflow is less of a concern.

(I understand the considerable investment in your teaching materials @timotheegiet - if we go ahead with that, we could have the classic shortcuts be the standard for new installations of Krita 3.x if that is important to you. Also, I think your feedback about what limitations there are in the current shortcut system would be particularly valuable, for the very same reason.)

6. "Previous Paintop" is not a replacement for the eraser.
A lot of the discussion has focused on the Previous Paintop functionality. In my opinion, previous paintop is not a suitable replacement for the eraser, in fact I think the ideal "previous paintop" is orthogonal to brush and eraser.

By "orthogonal" I mean it could be possible to have a history of presets for the eraser and for the brush, so that you can toggle between your favorite erasers and toggle between brushes. Suppose a user wants to switch between a brush and a smudge tool. In that case, they would have to lose the record of their eraser by flipping between paintops. Extending the "previous paintop" into having multiple quick paintops is not a solution to the problem. we may be able to add some expanded functionality to have multiple previous presets for the brush and multiple presets for the eraser. What I'm saying is that the features of eraser and paintop are more powerful when they are offered separately than when they are offered together. (I'll also mention that really making those ideas work nicely like that would require such a substantial patching down in libflake that it should probably wait until after 2.9 branch is discontinued.)

This is why I hold the following opinions about the previous suggestions:

  1. Switch preset button in the UI: it's worth considering but it should be thought of as a different issue.
  2. Add carousel: I really like providing something like that, but it requires the bigger refactoring mentioned above and it's a different issue.
  3. As @timotheegiet mentioned, it's hard to keep the history of paintops straight, and the system is not used very much as is.
  4. Telling users to use previous paintop as a replacement for the eraser is in contradiction to points 1 and 3 I've made above.

Addressing some other things
This includes some other the points @timotheegiet and @Deevad raised:

  • This patch would requires quite little effort to switch to the old workflow. If your workflow requires using one brush on the pen nib with both regular and erase paintops AND a different brush on the eraser then yes, you either have to use the dropdown menu, create a new brush preset, or change to the old behavior. You only have to do one of those things once, when you install Krita, then everything can be fixed however you want.
  • The "keep eraser size" checkbox is a simple UI issue and can be fixed super easily. One potential solution would be to have a checkbox "legacy eraser behavior" in the main menu which restores the old way of doing it by default. The check box to preserve eraser size could be moved up there.
  • Providing an option to relate the eraser and brush size is an interesting idea. If we add this and perhaps some other things in a small eraser customization menu to be added later. It would be a lot of work to do it right now.
  • [1] One other change that could make this seem more natural would be to link the mouse device and the stylus device together. That way it really *is* the same as flipping the stylus over, if you are only using one tablet device. Since we already limit the ability to switch from the stylus device back to the mouse, this is a very tiny workflow change.

@abrahams:
when you say "Telling users to use previous paintop as a replacement for the eraser is in contradiction to points 1 and 3 I've made above", I think you misunderstood what I proposed.

What I meant is: for the / key, replace the "previous preset swicth" shortcut with this "switch to eraser tip preset (and tool)" (or a virtual one for users without an eraser tip).
As far as I understand this is what you did, just to me it makes more sense to make it replace the old confusing / shortcut instead of replacing e.

To me, both switching current preset to erase mode (and potentially different size) and switching between two paint devices (what I called slots..) are useful and I want users to have both accessible by default, not have to choose between one or the other. Both deserve a button in the toolbar and a default shortcut.

abrahams added a comment.EditedDec 11 2015, 8:30 PM

@abrahams:
when you say "Telling users to use previous paintop as a replacement for the eraser is in contradiction to points 1 and 3 I've made above", I think you misunderstood what I proposed.

What I meant is: for the / key, replace the "previous preset swicth" shortcut with this "switch to eraser tip preset (and tool)" (or a virtual one for users without an eraser tip).
As far as I understand this is what you did, just to me it makes more sense to make it replace the old confusing / shortcut instead of replacing e.

To me, both switching current preset to erase mode (and potentially different size) and switching between two paint devices (what I called slots..) are useful and I want users to have both accessible by default, not have to choose between one or the other. Both deserve a button in the toolbar and a default shortcut.

How about E to toggle eraser device and shift+E to toggle eraser blend mode? (Those could be reversed in "classic" shortcut scheme.) I continue to think that toggling paintops is actually a useful feature and can be made even more useful in the future, I don't think that shortcut '/' should be touched by this change at all. Also, my point #1 is to have the "E" key do something that users coming from other software will find immediately familiar.

What to use as an icon for the eraser blend mode toolbar button? Having two different erase buttons is confusing. How about keeping a single toolbar button and simply hooking it up to a different action depending on the toggle box in the menu?

(Also re: terminology - krita codebase distinguishes between eraser vs. stylus vs. mouse as being different "input devices", so I'll try to distinguish "eraser device" versus "stylus device," and "eraser blending mode" for the current behavior)

woltherav edited edge metadata.Dec 11 2015, 8:35 PM

Don't forget the toolbar can be customised. So we can have two actions with the same icon, and the user switches the one in they need?

Don't forget the toolbar can be customised. So we can have two actions with the same icon, and the user switches the one in they need?

That's much cleaner than a single button that gets switched back and forth.

abrahams planned changes to this revision.Dec 11 2015, 8:49 PM

"How about E to toggle eraser device and shift+E to toggle eraser blend mode? (Those could be reversed in "classic" shortcut scheme.)"
That could potentially work, though I'd prefer to have both use modifier-free shortcuts.

" I continue to think that toggling paintops is actually a useful feature and can be made even more useful in the future,"
Yes, and I think exactly the same ;) that's the point: why limit it to Eraser action while it's actually much more ?
A button with an icon representing an input device change would be more meaningful than an eraser.

"Also, my point #1 is to have the "E" key do something that users coming from other software will find immediately familiar."
That is not a problem if we have schemes, invert the eraser-blending-mode and the switch-input-device shortcuts in the PS-compatible scheme.

"What to use as an icon for the eraser blend mode toolbar button?"
As I said above, a specific icon would be more meaningful for this feature, while eraser-blending-mode is really well represented only by... an eraser.

"Having two different erase buttons is confusing. How about keeping a single toolbar button and simply hooking it up to a different action depending on the toggle box in the menu?"
I know I'll most probably want to use both features, so we need two different buttons for both. Making some new adapted icons for the new button is not a problem.

@wolthera:
as said above: what if one wants to use both ? ...

Well, after thinking and reading, my opinion moved to this 'classic' mockup:


E key = toggle switch to this second Freehand eraser
{unassigned} = toggle to 'Erase blending' mode.
Why resisting? I think many new users are waiting for this.

@abrahams thanks for taking time to write/answer in details and for the code.
Sure '/' is another thread, sorry for mixing it here.

abrahams added a subscriber: scottpetrovic.EditedDec 11 2015, 10:34 PM

That could potentially work, though I'd prefer to have both use modifier-free shortcuts.

Keeping shortcuts mnemonic is also worthwhile, though. I think there are many other things that should take priority for Krita's top level shortcuts. (See T948)

" I continue to think that toggling paintops is actually a useful feature and can be made even more useful in the future,"
Yes, and I think exactly the same ;) that's the point: why limit it to Eraser action while it's actually much more ?
A button with an icon representing an input device change would be more meaningful than an eraser.

The icon shouldn't be just a stylus, because that doesn't get the point across. That is because of my point #2: the eraser is special, and it deserves special treatment in the UI. The eraser you switch to with the "E" key is synchronized with the reverse side of your stylus. This allows us to mesh the default shortcut key behavior together harmoniously. The icon should really reflect that it's purpose, for most people most of the time, is to work as an eraser.

How about having the icon switch between a pencil tip and a pencil eraser depending on whether eraser mode is toggled?

"Also, my point #1 is to have the "E" key do something that users coming from other software will find immediately familiar."
That is not a problem if we have schemes, invert the eraser-blending-mode and the switch-input-device shortcuts in the PS-compatible scheme.

Sure, this is not such a big deal.

I think the question of what should be the default is harder to resolve by discussion. My take is that you believe most users would prefer the current way, because you prefer the current way. (Having training DVDs makes this more weighty.) On the other hand I believe most users would prefer the new way, because I prefer the new way. We've both heard some people who prefer each, @scottpetrovic mentioning his preference for blending mode as default, and my having fielded several questions in IRC from users who do not like the blending mode. We'll need more input from others to decide what would be the better to set as defaults for the "E" key and the eraser button (or potentially buttons) in the UI.

abrahams added a comment.EditedDec 11 2015, 11:07 PM
In D549#12348, @Deevad wrote:

Well, after thinking and reading, my opinion moved to this 'classic' mockup:


E key = toggle switch to this second Freehand eraser
{unassigned} = toggle to 'Erase blending' mode.

Technically now in Krita 3 is the first time it would be possible to design it that way, and purely based on the appearance & consistency with PS I think it's not a bad idea, but I believe @rempt has expressed strong preference against it.

Why resisting? I think many new users are waiting for this.

Thanks for backing me up here. (It's hard to ask the opinions of people who have never even used Krita before!)

Wow, there are quite a few things going on with this. After looking over everyone's opinions for a bit and thinking about it, I personally think the eraser mode needs to be a tool. This is my logic and potential solution...

Currently the erase mode only changes the blending mode to erase. That is it. It is just a toggle button. That is all of the functionality and options it has. What it looks like is that different people want more functionality to be added to erasing. Some people want it to toggle, other people want it to be set to a defined preset, other options to keep the same brush size as the freehand brush.

What that tells me is that erasing needs to be a more robust tool with greater control. If I just go by my gut and take a stab at a solution, I would say to take the erase mode off of the toolbar and make it a tool in the toolbox. When the eraser tool is selected it will have Tool Options where people can *choose* how it functions. These are the options I see right now.

  • [checkbox] Use shortcut as toggle button ( tooltip: The eraser shortcut key will toggle between the eraser and freehand brush tool)
  • [checkbox] Use same size as brush (tooltip: The brush size will always have the size as the eraser size)
  • [checkbox] Share brush preset with eraser (tooltip: Your brush and eraser will share the same preset)

Making these options like this, they can be saved in the kritarc file for Krita to remember the settings for later.

I do not think we should have two erase tools. We should really try to just have one tool if possible. There is also a use case of erasing with things like gradients, but something like this can always be achieved by just changing the painting blending mode manually to erase.

Those are my thoughts.

I like the configuration options you propose, @scottpetrovic.

@abrahams:
"Keeping shortcuts mnemonic is also worthwhile, though. I think there are many other things that should take priority for Krita's top level shortcuts."
Ok then, we can use e and shift+e, assigned the opposite way in classical and X-compatible modes.

"How about having the icon switch between a pencil tip and a pencil eraser depending on whether eraser mode is toggled?"
Yes, that is one of the ideas I had in mind to suggest device switch :)

By the way, as you must know, a lot of tablets don't have physical reverse-side button on the stylus, I'm wondering will it still work for those?

"My take is that you believe most users would prefer the current way, because you prefer the current way. "
Yes and no, I really believe they are both valuable, I don't really prefer one. For my own use case until now, I most of the time use the e shortcut to use erase blend mode on purpose, but at some points I often also need a different eraser, so I select one in the presets, then select again the painting preset, which is not ideal.
That's why having both buttons would be great.

@scottpetrovic and @Deevad: I also don't think moving to a tool is a good idea, mostly because it breaks the workflow to switch back and forth with a single key.

@scottpetrovic:
"I do not think we should have two erase tools. "
sure, and actually erase must not be a tool but some paint options.

see it as two quite different options related to erasing.
-first one is used to.. paint in "substractive" mode.
-second one is used to select a different paint device, related to the reverse side/eraser tip.

A seperate tool would be tricky to implement code wise, because what we want isn't actually a second tool, but a second preset, and architecturally it can get messy to get that behaviour right.

Furthermore, I have another usecase to consider by you gentlemen: erasing with the geometric tools and the gradient tool by switching to eraser mode. Hence why we need to seperate actions here, because those won't be able to be done with the preset switch.

Hm... Having read everything now (and I really liked the constructive discussion), I would propose the following:

  • for the freehand tool, keep everything as it is now. Don't change anything in the way 'E' functions, '/' functions. The reason I think we should not change existing behaviour is because it's by now enshrined in half a dozen books, endless tutorials and the finger memories of tens of thousands of users. (We should keep thinking about a better preset caroussel than changing to the next or previous preset in the favorites box.)
  • make an experimental eraser tool. I don't want tools to proliferate, but at one point, I'm afraid we're going to have to give up. This tool should be a subclass of the brush tool set to an eraser preset by default. The tool should have its own shortcut and that is not going to be 'E' by default because I don't think we should change the existing behaviour.

AND we need to make sure that this second tool only gets access to eraser presets and that it disables the blending mode combobox. That's going to be tricky, but it's the only way I can see this work out in a comprehensible way.

abrahams updated this revision to Diff 1509.Dec 14 2015, 12:53 AM
abrahams edited edge metadata.

Fix eraser handling

abrahams planned changes to this revision.EditedDec 14 2015, 2:55 AM

This latest update is not implementing any new features, just fixing the old patch and enabling pressing "E" to switch devices.

@timotheegiet: just quickly about devices without physical erasers - SP3 falls in that category, so I definitely do intend to create a solution which is well tailored for those devices.


So back to the interesting part, what to do next. I'm going to recant something I said earlier, because I made a mistake. When @Deevad made his mockup, I thought he was only implying that the current eraser button should be moved to the toolbox, so you see the toggle state there. That's what I meant to say is not a bad idea, the rationale being that's where users expect to see the eraser, so we can just move the button there. But afterward, everyone started talking about making a separate eraser tool entirely, which I don't actually think is the way to go. So I'm taking that back.

@scottpetrovic: I agree with you, the current behavior is too limited, and we need a more powerful solution. The patch I have here is a more powerful solution, it provides robust behavior with a lot of control for the user. It can be a good solution to the particular problems you bring up, but compared to a separate tool, this patch is easier to implement, less of a major architectural change, and I think better for other reasons too.

That said, I do quite like your behavior suggestions. I just don't think we need a tool to achieve them. I'll get back to those suggestions in the end of this post.

@rempt: Having tools proliferate is definitely annoying, the one-icon-wide toolbox fills up the screen pretty easily if you increase the size of the icons. The reason I thought putting the eraser button in the toolbox would be fine was just because that's where people expected it to be, not because I thought it would be particularly useful to add a new tool.

I've been suggesting already that we may want to make a few changes at once that would outdate the guides and books. Even @timotheegiet was agreeing this could be acceptable as long as there's some compatibility options to keep the old behavior. Adding an eraser tool would make it harder to keep continuity with the books, but just adding or changing around a shortcut would make it easily possible to maintain some continuity, just by changing a shortcut or adding a check box to request legacy behavior. Adding a separate eraser tool is an even bigger break that couldn't be matched with classic behavior simply by a checkbox.

A separate eraser tool also prevents us from implementing @woltherav's ideas. @timotheegiet also brought up other good points against making an actual tool, importantly that the eraser shortcut would no longer be a toggle, it would be a one-way thing.

Finally, a separate tool would be a huge pain to code compared to what I'm doing now, e.g. tagging presets to be linked to this eraser tool, and thus I am not interested in implementing such a change myself.


However the recent comments have kept me thinking. It seems like users should have the opportunity to connect the eraser paintop and the brush paintop with some different options. The benefit of the current behavior is that the brush preset and size can be connected. Matching the eraser and the brush is just as easy to do with the method I'm using than with making it as a tool.

What I can do is this: create an eraser mode which connects the current eraser mode paintop with the current draw mode paintop. There can be an option to sync the brush size, or the size ratio, and an option to sync the brush preset. There could be an option to sync the opacity and such as well, depending on user demand. That would require a good deal of extra effort here, but it would capture pretty much all of the benefits of making a new tool but still remain easier than that. If the eraser functions more like a global mode, the stuff that @woltherav proposes would not be so hard to implement, either.

@rempt, this stuff could probably be easier if I take a bigger scalpel to KoToolManager, thoughts on that? I don't intend to completely refactor it (far too complex and frightening to do such a thing only for the sake of the eraser...) but I have held myself back from touching it too much to avoid delta with 2.9.

@abrahams: ah, funny the eraser button on the side, never seen that before.
But, I was talking about devices without any eraser button, like most non-wacom tablets, what about those?

I've read carefully your last proposal, and I'm a bit disapointed because of this:
"There can be an option to keep the same size, or keep a fixed size ratio, and an option to keep the same brush preset"
That would mean using both features would be several clicks away to switch from one to the other, so not really faster than selecting manually another preset or erase blend mode...

I really hope we can find a way to have both features in a not-mutually-exclusive way.

I've made a little mockup to illustrate my idea.

Here is what it would look like by default :


(1st paint device - normal paint mode)

Press press E (or shift+E in alternative scheme) to switch only the blending mode, and press it again to return to previous blend mode

Press shift+E (or E in alternative scheme) to switch the paint device, by default using the default eraser preset and with erase-blend-mode activated accordingly.

(the icon can be optimised a little more, I'll do it if you validate the idea..)

also I didn't precise, but of course in this proposal the eraser-blend-mode state should be stored independently for each device...

Deevad added a comment.EditedDec 14 2015, 2:04 PM

@rempt ( about an Eraser tool in the vertical main Toolbox ) : Ok, I wasn't really happy about adding this eraser in toolbar either. Sure, It's a bad idea as any painting tools (Freehand/LineTool/RectangleTool/[...]/Multibrush Tool) can potentially 'erase' with 'E' key as pointed @woltherav (thanks for this reminder. I was stupid to skip this.)This argument definitely exclude adding an Eraser tool in the vertical main Toolbox.

@timotheegiet ( about today's mockup ): It took me long time to understand the 'flipped pen' icon in your last mockup. I find the logic behind it unnecessarily complex: It's already hard to communicate to the user that each drawing tool of Krita (Freehand/LineTool/RectangleTool/[...]/Multibrush Tool) could use different device ( eraser / stylus / mouse / stylus2 / airbrushpen ...etc... ) and each of this devices could store a different preset during the painting session (airbrush preset.kpp / basic brush.kpp / eraser hard.kpp ...etc... )... So, It's getting even more complex now if the 'stylus device' can pretends to be an 'eraser device' after hitting a special key while still being able to switch to an eraser 'blending mode' after hitting another key.

Why not just trying to keep a single 'eraser mode' ?

  • 'E' key switch to an 'eraser mode'.
  • Pressing 'E' key again switch back to active paint tool (as in "Freehand/LineTool/RectangleTool/[...]/Multibrush Tool" ).
  • Each paint tool (as in "Freehand/LineTool/RectangleTool/[...]/Multibrush Tool" ) tries to propose out-of-the-box an appropriate/smart default config for the 'eraser mode' depending user's active kpp preset.
  • If smart/auto choices are not appropriate, an easy-to-reach config option in the top toolbar can quickly help to customise the behavior of the 'eraser mode'.
  • Flipping stylus also trigger the same 'eraser mode'.
  • Pressing an 'eraser icon' on the UI also trigger this 'eraser mode'. Pressing it again exit the 'eraser mode'.
  • The 'eraser icon' on the GUI give to the user a feedback when the 'eraser mode' is on or off (icon highlight system)

This feels simplier to me.

@Deevad: The idea of what abrahams propose initially here is also to provide the functionality of having two separate devices to switch even for those who don't have it physically on their stylus.
So I think it has to be communicated properly..

also, I didn't quite understand what you proposed:
"'E' key toggle-switch to an 'eraser mode'.
Pressing 'E' key again toggle switch between active paint tool (as in "Freehand/LineTool/RectangleTool/[...]/Multibrush Tool" ) to the 'eraser mode'."
You mean, like press it once does something, press it again does something else, and press it a third time to get back to normal? That sounds not nice or simple to use...

@timotheegiet my bad for the explanation. I just accidentally used 'toggle' word two times. (edited/fixed now)

@Deevad : Ok thanks, now I see better your idea.

A few comments:
"Each paint tool (as in "Freehand/LineTool/RectangleTool/[...]/Multibrush Tool" ) tries to propose out-of-the-box an appropriate/smart default config for the 'eraser mode' depending user's active kpp preset."
I'm not sure about this part. I don't like the software trying to be smarter than me to choose which one I want...

"... an easy-to-reach config option in the top toolbar can quickly help to customise the behavior of the 'eraser mode'."
This part I like, as it would allow using both efficiently (considering we're talking about a 1-click button).

I personally have a desire to be able to have different Tool Options set for eraser mode and non-eraser mode: When drawing, I like to have some sort of smoothing enabled, possibly the stabilizer with a strong-ish setting if i'm inking over a sketch for example. Unfortunately, having smoothing (or even worse: the stabilizer) turned on when erasing makes it very tedious to do the kind of back-and-forth motion I often use to erase. It'd be nice if the final design for this could accomodate my use case. Thanks!

Storm added a subscriber: Storm.Feb 1 2016, 11:54 AM

I personally stopped using eraser presets ever since I discovered what E does. This is a unique feature in Krita and one of the best feature I've ever seen, please do not make it go away! If i REALLY want an eraser preset, that's what the eraser side of my stylus is for. I press E like a million times while painting, I don't want to press Shift-E every time instead...

Please, either keep E the same and make Shift-E switch preset, or add a setting so I can revert to original behavior.

abrahams abandoned this revision.Apr 4 2016, 4:35 PM

Taken care of by rKRITAb55d79bb7dcf8a8fe08ec55aef9c7e0e4120e94d