Cursor color change when in erase mode

I would love to see a cursor change change when I press the E key for erase.

Often times when I paint on my Surface pro I like to be in full screen + canvas mode and I use a macropad to toggle between settings. Most times when I’m in canvas mode and I press the key to erase there is no indication that I’m in the erase mode and sometimes I hit the key accidentally. I would love to see the center of the cursor change or and OSD popup that quickly fades letting me know that I’m in erase mode.

This feature would definitely speed up my process and make it so that i make less errors.

7 Likes

i’ve already started a discussion here

@scottyp has worked on it but on another branch and the modifications where lost i think. i wish it came someday :slight_smile:

2 Likes

not exactly what you want but this plugin has something to show its in eraser mode but its not perfect but works most of the time

I wasn’t thinking if an E inside the cursor but an overlay anywhere on screen or above the cursor. A cursor color or shape change would be ideal that way I don’t take my eye off of what I’m doing. I would be happy with some kind of key overlay off to the right or left when you get into canvas mode. Any kind of status indication. Could also work with a foreground/background color swap too. It would be pop up and disappear.

There are key overlay plugins for Blender I’d be happy with something like that for Krita.

FYI, I found this open source exe that can do what I need until there is a better solution.

If you run into any issues, feel free to report the bugs.

Have you tried the Show Eraser feature of the ShapesAndLayers plugin?

It doesn’t work for me. The cursor is permanently the eraser icon whether i’m in paint or erase mode.

Weird, to confirm, are you on Krita 5?

I’m on 5.0.2

I really would like this also. Two years ago, a code existed to make this happen; but never was merged after the sources got accidentally removed. You can read the thread and example here, it was pretty cool:

5 Likes

Thanks for sharing this. I read that thread and a lot of the suggestions sound good. I think just a color change of the cursor would be great. How can we make this happen? Could someone just whip up a quick plugin that does just that?! I really wish I could program.

You are on windows correct? which version of windows?

Also, does the eraser icon disappear when you leave the view? or does it remain?

I’m on Windows 11. The eraser Icon stays and does not change back.

I guess I’ll spin up a Windows 11 VM over the weekend and see if I can replicate it.

Otherwise, if you wish to do some testing:

go to your resource folder, pykrita, ShapesAndLayers, then look for ShapesAndLayersShowEraser.py, open it in notepad and search for:

        self.eraserStatus=status

and replace it with: (spacing is important)

        self.eraserStatus=status
        print ("STATUS", status,  Krita.instance().action('erase_action').isChecked(), self.eraserBtn.isEnabled() )

Then save it and run from command prompt krita.com, then click eraser on and off and tell me any lines that start with STATUS that appear on command prompt.

Status True True True
Status False False False

Even with the plug in off I can stilll see the eraser icon inside the cursor.

That means it is detecting eraser being turned on and off properly.

Try replacing:

            self.eraserMode = False
            QApplication.restoreOverrideCursor()
            QApplication.restoreOverrideCursor()

with

            print ("ERASER IS", self.eraserMode  )
            self.eraserMode = False
            QApplication.restoreOverrideCursor()
            QApplication.restoreOverrideCursor()

And try toggling it on and off and tell me the lines with ERASER IS if you see them or if you do not.

In the shapeAndLayersShowEraser.py

self.eraserMode = False
QApplication.restoreOverrideCursor()
QApplication.restoreOverrideCursor()

is not listed.

It should be there, do note you can only search for 1 line so search for QApplication.restoreOverrideCursor() and keep going next until you see it appear 2x

Its not there. This is at the end of the py file. (ShapeAndLayers 0.07) I dont see. self.eraserMode = False

I think I may know the problem. Press the code button, then download zip. That will get you version 0.09. If you still have the problem, then try what I mentioned above.