I am coding an addon, where a specific feature draws a small 2D overlay into the viewport via the draw handlers. While this works fine, I want this overlay to react when the user hovers the mouse over it.
I know, that getting the mouse position and reacting to it is possible by using modal operators. However, continuously running modal operators block the autosave function and users will not be able to have autosave running when they use the addon.
So, is there an alternative way, which allows to:
- Track the mouse position while it moves?
- Call a
context.region.tag_redraw()
for aSpaceView3D
to update the viewport and redraw the 2D overlay?
Edit: Unfortunately, a custom tool suggested below is no option, because I need the addon feature to run continuously without blocking other Blender features (like other tools, etc.).