Page MenuHome

Hej Stylus! (Tablet configuration tool) and Blender issues
Closed, ResolvedPublic

Description

Operating system: macOS 10.15.6
Graphics card: NVIDIA GeForce GT 750M 2 GB
Intel Iris Pro 1536 MB
Wacom Tablet, Intros Pro, or Cintiq 24 HD f.i.

Broken: Version 2.91.0 2020-10-25

Eilert from Hej Stylus! writing. Hej Stylus! is a tool that smoothes tablet output amongst other features.
Hej Stylus! pulls live tablet event data and re-infuses altered events back into the macOS event stream using:

CGEvent.tapCreate(tap: .cgSessionEventTap,

     place: .headInsertEventTap,
     options: .defaultTap,
...

Using any of Hej Stylus!' position smoothing algos creates cursor issues in blender - on tablet use only. Mouse is not affected.
Using Tablet devices causes blender to 'use' both events - although Hej Stylus! is overwriting the tablet events.
We do wonder if you use any functions that force blender to process information directly from a hardware i/O source of some sorts.
Maybe blender also creates events by itself ..
We hope that you might shed some light on how you process incoming events from tablet devices so that we can find a workaround.

Exact steps for others to reproduce the error
1.) To test this issue goto: hejstylus.com and grab the latest version.
2.) Use a graphics tablet
3.) Use a smoothing algorithm (as seen in screenshot)
4.) Draw some annotations with blenders annotation tool f.i.

Revisions and Commits

Related Objects

Event Timeline

The relevant code is in intern/ghost/intern/GHOST_SystemCocoa.mm.

I suspect it's due to the use of [cocoawindow mouseLocationOutsideOfEventStream] to get the mouse position, introduced in rB12b642062c6f: Holiday coding log :), for this reason:

OSX: fixed bug that stopped giving mouse events outside window. This also fixes "Continuous Grab" for OSX. (error since 2009)

Even disregarding this bug report, mixing the state at the time of the event and current state this way should be avoided, getting rid of that in other places has fixed bugs.

I imagine it's possible to get the mouse location outside of the window from the event in another way.

This comment was removed by Eilert Janßen (Eilert).
Ankit Meel (ankitm) changed the task status from Needs Triage to Confirmed.Oct 28 2020, 9:44 AM

Even disregarding this bug report, mixing the state at the time of the event and current state this way should be avoided, getting rid of that in other places has fixed bugs.

I committed a possible fix for this. It will be in the next 2.91.0 build on https://builder.blender.org/download/.

Brecht Van Lommel (brecht) changed the task status from Confirmed to Needs Information from User.Fri, Oct 30, 4:50 PM
Brecht Van Lommel (brecht) closed this task as Resolved.Tue, Nov 3, 3:39 PM
Brecht Van Lommel (brecht) claimed this task.

Great, I'll consider this solved then.

Dear Brecht,
I've double checked on V2.91.0 Beta and can confirm that the issue is solved.
Thank you very much for the swift solution!
Best regards, Eilert