Page MenuHome

GRAB_CURSOR bl_option stops working as soon as modal operator returns PASS_THROUGH the first time
Open, Confirmed, MediumPublic

Description

System Information
Operating system: Linux-4.13.10-041310-generic-x86_64-with-debian-stretch-sid 64 Bits
Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.67

Blender Version
Broken: version: 2.80 (sub 57), branch: blender2.7, commit date: 2019-04-15 23:42, hash: rB5ac7675f4c9c

Short description of error
Using the GRAB_CURSOR bl_option in a modal operator, works fine until the operator returns PASS_THROUGH the first time - for instance, to adjust the viewport using MIDDLEMOUSE, while the modal is active.
After the first PASS_THROUGH the cursor is no longer warped to the opposite side.

Exact steps for others to reproduce the error

  • open attached blend file
  • run the script
  • in the 3d view, look for 'GrabCursorBug' operator in the search menu and run it
  • move the mouse horizontally across the region borders, notice how it warps to the opposite side accordingly
  • hold down MIDDLEMOUSE and move the mouse to adjust the viewport, release again
  • try moving the mouse across the region borders again, it won't warp to the other side anymore

video demo

Details

Type
Bug

Event Timeline

MACHIN3 (MACHIN3) updated the task description. (Show Details)
Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.Apr 17 2019, 3:21 PM

I'm guessing that the grab is let go because the middle mouse operator grabs the mouse too.

I'm unsure if we support chaining grabs like this, @Campbell Barton (campbellbarton) ?