Lorien icon indicating copy to clipboard operation
Lorien copied to clipboard

Support erasing from pen's button

Open ZvikaZ opened this issue 2 years ago • 19 comments

Feature/enhancement description:

Hi. Your program looks great. However, I'm using it with Wacom Intuos, which has the ability to configure one of the pen's button as "eraser". Other applications, such as Microsoft Whiteboard, respect this. But with Lorien it's just ignored.

I see here two possible solutions:

  • support the button's API
  • or maybe, even as a temporary bypass for this problem, make a "temporary erasing mode", maybe by clicking SHIFT or some other modifier key; and then we can map the pen's button to that modifier key.

I'm aware of the E shortcut to enable erasing mode, but this can't be used, because the it won't came back to brush mode when the button is released

ZvikaZ avatar May 16 '22 09:05 ZvikaZ

Unfortunally i don't think there is a way to do this in Godot as of now. The "temporary erasing mode" sounds like a good idea, but the shift modifier is already used for various other tools (like snapping in the line tool for example), so that would have to be a different key.

mbrlabs avatar May 17 '22 15:05 mbrlabs

Well, shift was just an example. It can be any modifier.

ZvikaZ avatar May 17 '22 16:05 ZvikaZ

This is the only feature missing that's preventing me from using lorien. I have gotten so used to being able to hold that button to erase that I press it with muscle memory and in lorien it just draws strokes instead of erasing. This completely ruins the experience for me.

davidpanic avatar Jun 13 '22 10:06 davidpanic

How about getting this to work with the Surface Slim Pen 2? Other drawing applications, especially One Note, permit using the reverse end of the pen as an eraser.

0xNF avatar Jun 15 '22 02:06 0xNF

The temporary erasing mode is beeing worked on in https://github.com/mbrlabs/Lorien/pull/154.

mbrlabs avatar Jun 16 '22 08:06 mbrlabs

I am working on adding eraser detection feature to godot engine. So far, managed to get Linux and Windows support (winink driver only).

Project status: https://github.com/hansemro/godot/discussions/1

hansemro avatar Jun 19 '22 00:06 hansemro

Added wintab support.

hansemro avatar Jun 19 '22 02:06 hansemro

Experimental Lorien tree: https://github.com/hansemro/Lorien/tree/eraser-detect-dev

Will add test builds at some point.

hansemro avatar Jun 19 '22 11:06 hansemro

https://user-images.githubusercontent.com/40348686/174579829-925b006c-8485-4e6c-8513-35475fce4b2a.mp4

Fixed macOS support.

hansemro avatar Jun 20 '22 10:06 hansemro

Added godot engine 3.5.rc/3.x builds for anyone interested in testing experimental branch: https://github.com/hansemro/godot/releases/tag/3.5.rc-eraser-detect-r1

@mbrlabs These include arm64 support, so please let me know how it works on M1.

Edit: replaced individual template files with templates.tpz.

hansemro avatar Jun 22 '22 05:06 hansemro

@hansemro What's the current state of your Godot PR? Seems like it's pretty much done. Maybe take it out of the Draft state so more people can start reviewing/testing it?

mbrlabs avatar Jun 22 '22 11:06 mbrlabs

There are some things I can cleanup but PR is ready to be reviewed as is. Also not going to rebase or squash until told to.

Edit: PR is out of draft state.

hansemro avatar Jun 22 '22 20:06 hansemro

Merged in godot master/4: https://github.com/godotengine/godot/commit/6dcc9d11319ddb59089fb54551f852249081e027

Do I need to create another PR to backport it to 3.x?

hansemro avatar Jul 04 '22 20:07 hansemro

@hansemro Yes, you have to create annother PR with a 3.x version and open it against that branch. Normally Akien can cherrypick a lot of stuff for you, but things in that area apparently changed too much between 4.0 and 3.x. Backports usually get merged much quicker (as long as it don't break compatibility, which this doesn't)

mbrlabs avatar Jul 04 '22 21:07 mbrlabs

Took some time, but PR for 3.x got merged: https://github.com/godotengine/godot/commit/101cbe5d5bbb6454867756152210f2b33b9877e0

Now, we wait for 3.5 stable to land...

hansemro avatar Jul 15 '22 00:07 hansemro

We got a bit lucky that it got merged so close to release😁...so, good work and thanks a lot!

mbrlabs avatar Jul 15 '22 14:07 mbrlabs

3.5 stable has landed :tada:, are there any plans on this being merged and released soon?

davidpanic avatar Aug 11 '22 18:08 davidpanic

I'll leave it to @mbrlabs to implement the feature more sanely.

hansemro avatar Aug 11 '22 21:08 hansemro

I'm looking into it :)

mbrlabs avatar Aug 15 '22 15:08 mbrlabs

Implemented in https://github.com/mbrlabs/Lorien/pull/225

mbrlabs avatar Aug 05 '23 11:08 mbrlabs