Hej Stylus! (Tablet configuration tool) and Blender issues #82143

Closed
opened 2020-10-27 14:28:22 +01:00 by Eilert Janßen · 15 comments

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.positionalIssues.blend

blender+hej.png

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.[positionalIssues.blend](https://archive.blender.org/developer/F9110805/positionalIssues.blend) ![blender+hej.png](https://archive.blender.org/developer/F9110804/blender_hej.png)
Author

Added subscriber: @Eilert

Added subscriber: @Eilert

Added subscriber: @brecht

Added subscriber: @brecht

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 12b6420, 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.

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 12b6420, 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.
Author

This comment was removed by @Eilert

*This comment was removed by @Eilert*
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

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.

> 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.

This issue was referenced by 9e85812acc

This issue was referenced by 9e85812acc88fa469aecccb1d5ed3e28e362278a

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

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

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

Added subscriber: @girafic

Added subscriber: @girafic
Thx @brecht. It's working fine now. [Bildschirmvideo aufnehmen 2020-11-03 um 13.54.01.mp4](https://archive.blender.org/developer/F9180724/Bildschirmvideo_aufnehmen_2020-11-03_um_13.54.01.mp4)

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'
Brecht Van Lommel self-assigned this 2020-11-03 15:39:15 +01:00

Great, I'll consider this solved then.

Great, I'll consider this solved then.
Author

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

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
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#82143
No description provided.