cursor_warp doesnt register #40639

Closed
opened 2014-06-15 12:10:22 +02:00 by Gert De Roost · 8 comments
Member

System Information
Windows 64-bit - Nvidia

Blender Version
Broken: 2.70a f93bc76

Short description of error
When using context.window.cursor_warp(x, y) to set the mouse pointer, this mouse pointer coordinates seem to be programmatically not 'registered' until after user interaction. Python ops after cursor warp use the old mouse pointer coordinates.

Exact steps for others to reproduce the error
When using:

context.window.cursor_warp(mousex, mousey)
bpy.ops.view3d.cursor3d('INVOKE_DEFAULT')

One would expect the 3d cursor to be placed at (mousex, mousey) but the 3d cursor is placed at the mouse coords from before the cursor_warp() call. Same happens with other view3d ops I tested.

Based on a (as simple as possible) attached .blend file with minimum amount of steps

**System Information** Windows 64-bit - Nvidia **Blender Version** Broken: 2.70a f93bc76 **Short description of error** When using context.window.cursor_warp(x, y) to set the mouse pointer, this mouse pointer coordinates seem to be programmatically not 'registered' until after user interaction. Python ops after cursor warp use the old mouse pointer coordinates. **Exact steps for others to reproduce the error** When using: context.window.cursor_warp(mousex, mousey) bpy.ops.view3d.cursor3d('INVOKE_DEFAULT') One would expect the 3d cursor to be placed at (mousex, mousey) but the 3d cursor is placed at the mouse coords from before the cursor_warp() call. Same happens with other view3d ops I tested. Based on a (as simple as possible) attached .blend file with minimum amount of steps
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @paleajed-3

Added subscriber: @paleajed-3

Added subscriber: @PawelLyczkowski-1

Added subscriber: @PawelLyczkowski-1

Added subscriber: @ideasman42

Added subscriber: @ideasman42

cursor_warp was added so operators could hide the mouse and use game-style mouse warping.

This means that we may not want this to generate mouse events, but in some cases it may be useful too, perhaps this needs to be an option. (not checking this moment, but updating window->eventstate->x/y could be enough)

`cursor_warp` was added so operators could hide the mouse and use game-style mouse warping. This means that we may not want this to generate mouse events, but in some cases it may be useful too, perhaps this needs to be an option. (not checking this moment, but updating window->eventstate->x/y could be enough)

This issue was referenced by blender/blender@2886f75f46

This issue was referenced by blender/blender@2886f75f46569b0bbcd9e24754279ee270b7a789

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit blender/blender@2886f75f46.

Closed by commit blender/blender@2886f75f46.
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#40639
No description provided.