I am developping a modal operator. How can I determine if the cursor is over the Tools shelf or Properties shelf or pure 3D content (don't know how to call the last one correctly)?
My idea is to block an event in modal(self, context, event)
from passing it back to Blender if the cursor is over pure 3D content. In that case modal(..)
returns {'RUNNING_MODAL'}
. However if the cursor is over the Tools shelf or Properties shelf the event is passed back to Blender, so the user can change some parameters in GUI panels located in the Tools shelf or Properties shelf. In the latter case modal(..)
returns {'PASS_THROUGH'}
.