The recent changes broke the pressure and tilt of the tablet pen #59645

Closed
opened 2018-12-20 00:00:26 +01:00 by Martin Capitanio · 8 comments

System Information


OS Linux, recent Ubuntu 18.04 LTS,
tested with GP and texture painting,

xsetwacom --list devices
Wacom Intuos4 4x6 Pad pad id: 12 type: PAD
Wacom Intuos4 4x6 Pen cursor id: 15 type: CURSOR
Wacom Intuos4 4x6 Pen stylus id: 13 type: STYLUS
Wacom Intuos4 4x6 Pen eraser id: 14 type: ERASER

Works


Krita v4.1.7, Gimp 2.10.8, Blender 2.79b

Last working blender2.8 commit:
5166132708 2018-11-24

./blender8-181123 --debug-events
wm_event_do_handlers: Handling event
wmEvent  type:1 / LEFTMOUSE, val:1 / PRESS,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0,
         mouse:(631,563), ascii:'', utf8:'', keymap_idname:(null), pointer:0x7f000081e908
 tablet: active: 1, pressure 0.6023, tilt: (-0.1270 0.2381)
wm_event_do_handlers: Handling event
wmEvent  type:1 / LEFTMOUSE, val:2 / RELEASE,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0,
         mouse:(688,576), ascii:'', utf8:'', keymap_idname:(null), pointer:0x7f0000921a88
 tablet: active: 1, pressure 0.0000, tilt: (-0.1746 0.2698)

Known broken


593ed1347c 2018-12-19 master

@ideasman42 the blender2.8 branch is broken after
Merge branch 'master' into blender2.8 059c1197
059c119719

and still broken on the current blender2.8 branch tip
a8198e6fbf 2018-12-19

( GHOST_SystemX11.cpp with un-commented printf's)

./blender8-181219 --debug-events
Tablet type:'(null)', name:'Virtual core pointer', index:0
Tablet type:'(null)', name:'Virtual core keyboard', index:1
...
Tablet type:'PAD', name:'Wacom Intuos4 4x6 Pad pad', index:10
Tablet type:'CURSOR', name:'Wacom Intuos4 4x6 Pen cursor', index:11
	found stylus
		found ValuatorClass
Tablet type:'STYLUS', name:'Wacom Intuos4 4x6 Pen stylus', index:12
Tablet type:'ERASER', name:'Wacom Intuos4 4x6 Pen eraser', index:13

...

wm_event_do_handlers: Handling event
wmEvent  type:1 / LEFTMOUSE, val:1 / PRESS,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0,
         mouse:(376,662), ascii:'', utf8:'', keymap_idname:(null), pointer:0x7f0f475add08

wm_event_do_handlers: Handling event
wmEvent  type:1 / LEFTMOUSE, val:2 / RELEASE,
         shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0,
         mouse:(419,605), ascii:'', utf8:'', keymap_idname:(null), pointer:0x7f0f475c8088
System Information **** OS Linux, recent Ubuntu 18.04 LTS, tested with GP and texture painting, xsetwacom --list devices Wacom Intuos4 4x6 Pad pad id: 12 type: PAD Wacom Intuos4 4x6 Pen cursor id: 15 type: CURSOR Wacom Intuos4 4x6 Pen stylus id: 13 type: STYLUS Wacom Intuos4 4x6 Pen eraser id: 14 type: ERASER Works **** Krita v4.1.7, Gimp 2.10.8, Blender 2.79b Last working blender2.8 commit: 5166132708a42ce57ac83a6e5f85fe4190dba312 2018-11-24 ``` ./blender8-181123 --debug-events wm_event_do_handlers: Handling event wmEvent type:1 / LEFTMOUSE, val:1 / PRESS, shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0, mouse:(631,563), ascii:'', utf8:'', keymap_idname:(null), pointer:0x7f000081e908 tablet: active: 1, pressure 0.6023, tilt: (-0.1270 0.2381) wm_event_do_handlers: Handling event wmEvent type:1 / LEFTMOUSE, val:2 / RELEASE, shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0, mouse:(688,576), ascii:'', utf8:'', keymap_idname:(null), pointer:0x7f0000921a88 tablet: active: 1, pressure 0.0000, tilt: (-0.1746 0.2698) ``` Known broken **** 593ed1347c96aea691eb503a6bbed12c801f3faa 2018-12-19 master @ideasman42 the blender2.8 branch is broken after Merge branch 'master' into blender2.8 059c1197 https://github.com/sobotka/blender/commit/059c119719e04283808d3c7076886e1a58874f6b and still broken on the current blender2.8 branch tip a8198e6fbf6bc3ef870e89988593282489c011e4 2018-12-19 ( GHOST_SystemX11.cpp with un-commented printf's) ``` ./blender8-181219 --debug-events Tablet type:'(null)', name:'Virtual core pointer', index:0 Tablet type:'(null)', name:'Virtual core keyboard', index:1 ... Tablet type:'PAD', name:'Wacom Intuos4 4x6 Pad pad', index:10 Tablet type:'CURSOR', name:'Wacom Intuos4 4x6 Pen cursor', index:11 found stylus found ValuatorClass Tablet type:'STYLUS', name:'Wacom Intuos4 4x6 Pen stylus', index:12 Tablet type:'ERASER', name:'Wacom Intuos4 4x6 Pen eraser', index:13 ... wm_event_do_handlers: Handling event wmEvent type:1 / LEFTMOUSE, val:1 / PRESS, shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0, mouse:(376,662), ascii:'', utf8:'', keymap_idname:(null), pointer:0x7f0f475add08 wm_event_do_handlers: Handling event wmEvent type:1 / LEFTMOUSE, val:2 / RELEASE, shift:0, ctrl:0, alt:0, oskey:0, keymodifier:0, mouse:(419,605), ascii:'', utf8:'', keymap_idname:(null), pointer:0x7f0f475c8088 ```

Added subscribers: @ideasman42, @capnm

Added subscribers: @ideasman42, @capnm

Removing pen from the whitelist fixes the issue for this tablet:
intern/ghost/intern/GHOST_SystemX11.cpp:2332

Tablet type:'PAD', name:'Wacom Intuos4 4x6 Pad pad', index:10
Tablet type:'CURSOR', name:'Wacom Intuos4 4x6 Pen cursor', index:11
Tablet type:'STYLUS', name:'Wacom Intuos4 4x6 Pen stylus', index:12
	found stylus
		found ValuatorClass
Tablet type:'ERASER', name:'Wacom Intuos4 4x6 Pen eraser', index:13
	found eraser

Looks like refreshXInputDevices() first needs to check all device types before running through the device names …

Removing `pen` from the whitelist fixes the issue for this tablet: [intern/ghost/intern/GHOST_SystemX11.cpp:2332 ](https://github.com/sobotka/blender/commit/059c119719e04283808d3c7076886e1a58874f6b#diff-2f96c37e18daf236a8af483a36558479R2332) ``` Tablet type:'PAD', name:'Wacom Intuos4 4x6 Pad pad', index:10 Tablet type:'CURSOR', name:'Wacom Intuos4 4x6 Pen cursor', index:11 Tablet type:'STYLUS', name:'Wacom Intuos4 4x6 Pen stylus', index:12 found stylus found ValuatorClass Tablet type:'ERASER', name:'Wacom Intuos4 4x6 Pen eraser', index:13 found eraser ``` Looks like `refreshXInputDevices()` first needs to check all device types before running through the device names …

Looks like e5bc9fae54 caused the issue.

Looks like e5bc9fae54 caused the issue.

In particular, adding the "pen" to the whitelist causes the CURSOR to be erroneously recognized as a stylus in the device name check in tablet_mode_from_name():

Tablet type:'PAD', name:'Wacom Intuos4 4x6 Pad pad', index:10
Tablet type:'CURSOR', name:'Wacom Intuos4 4x6 Pen cursor', index:11
	found stylus
		found ValuatorClass
Tablet type:'STYLUS', name:'Wacom Intuos4 4x6 Pen stylus', index:12
Tablet type:'ERASER', name:'Wacom Intuos4 4x6 Pen eraser', index:13
In particular, adding the "pen" to the whitelist causes the CURSOR to be erroneously recognized as a stylus in the device name check in `tablet_mode_from_name()`: ``` Tablet type:'PAD', name:'Wacom Intuos4 4x6 Pad pad', index:10 Tablet type:'CURSOR', name:'Wacom Intuos4 4x6 Pen cursor', index:11 found stylus found ValuatorClass Tablet type:'STYLUS', name:'Wacom Intuos4 4x6 Pen stylus', index:12 Tablet type:'ERASER', name:'Wacom Intuos4 4x6 Pen eraser', index:13 ```
Brecht Van Lommel self-assigned this 2018-12-20 09:58:34 +01:00

This issue was referenced by 7bed048243

This issue was referenced by 7bed048243fef51e92b86e4383fa48d1d18d12ac

This issue was referenced by 29feb215f4

This issue was referenced by 29feb215f42d886659ee72c8166f9b207e127fec

This issue was referenced by 53a6a0b258

This issue was referenced by 53a6a0b2584a6730d6cfc03f3312ff0e5da91a4f

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
4 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#59645
No description provided.