Gizmo.modal(): current value '20514' matches no enum in 'Event', '(null)', 'type' #73727

Closed
opened 2020-02-11 09:24:07 +01:00 by dima glib · 8 comments
Member

Blender Version
Broken: all versions up to this point

Short description of error
Whenever a Shift or a Ctrl key is pressed/released during a modal gizmo operation, event.type returns an empty string and the following warning is printed to the console:

WARN (bpy.rna): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\python\intern\bpy_rna.c:1476 pyrna_enum_to_py: current value '20514' matches no enum in 'Event', '(null)', 'type'

Note: this warning is not printed if the script does not try to access event.type from a gizmo's modal() method.

Exact steps for others to reproduce the error

  1. Go to the "Scripting" workspace
  2. In the text editor area, load a "Gizmo Custom Geometry" python template (Templates -> Python -> Gizmo Custom Geometry)
  3. Add to the modal() method any code that accesses event.type (e.g. print(event.type))
  4. Run the script
  5. In the 3D view, tap / press / release the Shift or Ctrl keys while dragging the gizmo
**Blender Version** Broken: all versions up to this point **Short description of error** Whenever a Shift or a Ctrl key is pressed/released during a modal gizmo operation, event.type returns an empty string and the following warning is printed to the console: > WARN (bpy.rna): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\python\intern\bpy_rna.c:1476 pyrna_enum_to_py: current value '20514' matches no enum in 'Event', '(null)', 'type' Note: this warning is not printed if the script does not try to access event.type from a gizmo's modal() method. **Exact steps for others to reproduce the error** 1. Go to the "Scripting" workspace 2. In the text editor area, load a "Gizmo Custom Geometry" python template (Templates -> Python -> Gizmo Custom Geometry) 3. Add to the modal() method any code that accesses event.type (e.g. print(event.type)) 4. Run the script 5. In the 3D view, tap / press / release the Shift or Ctrl keys while dragging the gizmo
Author
Member

Added subscriber: @dairin0d

Added subscriber: @dairin0d
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm.
Looks like value 20514 is type EVT_MODAL_MAP, not sure why RNA_property_enum_identifier is not picking that up, checking...

Can confirm. Looks like value 20514 is type `EVT_MODAL_MAP`, not sure why `RNA_property_enum_identifier` is not picking that up, checking...
Member

Added subscribers: @JulianEisel, @ideasman42

Added subscribers: @JulianEisel, @ideasman42
Member

Hm, not too familiar with wmEvent.type, but it looks like not all event types (defined in wm_event_types.h) are in the enum (iterating with RNA_enum_from_value).
This might be for @ideasman42 or @JulianEisel to have a look at...

Hm, not too familiar with `wmEvent.type`, but it looks like not all event types (defined in wm_event_types.h) are in the enum (iterating with `RNA_enum_from_value`). This might be for @ideasman42 or @JulianEisel to have a look at...
Campbell Barton self-assigned this 2020-02-12 06:24:02 +01:00

This issue was referenced by blender/blender@f874f6817d

This issue was referenced by blender/blender@f874f6817d1c793da4fd423a3c8bf0e504ebfa4a

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sign in to join this conversation.
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-addons#73727
No description provided.