Missing events in modal operator #59250

Closed
opened 2018-12-12 15:42:31 +01:00 by Dominik Penk · 5 comments

System Information
Operating system: Windows 10 Enterprise (Version 1803)
Graphics card: GTX 1070

Blender Version
Broken:
(2.80, 16fc62e15f0, blender2.8, 2018-12-12)

Short description of error
Blender will not send RELEASE key events to a running modal operators if an operator or dialogue is associated with the key.

Exact steps for others to reproduce the error
Starting form the Simple Modal Template script logging events shows missing events.

Examples:
Pressing "Q" will generate a Event with type Q and value PRESS but releasing will not create an Event with type Q and value RELEASE.
Pressing "W" on the other hand generates both events
Pressing "G" will also only generate the initial PRESS event.

The attached .blend file contains a simple script that logs key (and mouse) events to the console to show the missing events.capture_bug.blend

**System Information** Operating system: Windows 10 Enterprise (Version 1803) Graphics card: GTX 1070 **Blender Version** Broken: (2.80, 16fc62e15f0, blender2.8, 2018-12-12) **Short description of error** Blender will not send RELEASE key events to a running modal operators if an operator or dialogue is associated with the key. **Exact steps for others to reproduce the error** Starting form the Simple Modal Template script logging events shows missing events. Examples: Pressing "Q" will generate a Event with type Q and value PRESS but releasing will not create an Event with type Q and value RELEASE. Pressing "W" on the other hand generates both events Pressing "G" will also only generate the initial PRESS event. The attached .blend file contains a simple script that logs key (and mouse) events to the console to show the missing events.[capture_bug.blend](https://archive.blender.org/developer/F5932498/capture_bug.blend)
Author

Added subscriber: @DominikP

Added subscriber: @DominikP
Member

Added subscribers: @ideasman42, @JacquesLucke

Added subscribers: @ideasman42, @JacquesLucke
Member

I think that is intended behavior. By pressing these keys you register another event handler that can decide whether to pass through events or not. It's the same when your modal operator does not return {'PASS_THROUGH'}. Modal operators "below" your operator will never see those.

@ideasman42 should know if this really is intended behavior.

I think that is intended behavior. By pressing these keys you register another event handler that can decide whether to pass through events or not. It's the same when your modal operator does not return `{'PASS_THROUGH'}`. Modal operators "below" your operator will never see those. @ideasman42 should know if this really is intended behavior.
Campbell Barton was assigned by Sebastian Parborg 2018-12-19 15:02:23 +01:00

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Right, modal keymap handler isn't guaranteed to get all events - other modal operators and popups can swallow the events before they reach this modal operator.

Closing.

Right, modal keymap handler isn't guaranteed to get all events - other modal operators and popups can swallow the events before they reach this modal operator. Closing.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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-addons#59250
No description provided.