Ray Intersect and Manips

36 views
Skip to first unread message

mattschiller

unread,
May 23, 2020, 10:41:49 AM5/23/20
to Python Programming for Autodesk Maya
I am using fnMesh.closestIntersection to find faces id's under the mouse. Issues is, I need to know if the mouse is over a manipulator handle also so that can take precedence. I am not sure if I can query if the mouse is hovering over a manip handle.

thanks,
-Matt

Marcus Ottosson

unread,
May 23, 2020, 12:11:35 PM5/23/20
to python_in...@googlegroups.com
I could've sworn I had stumbled upon this method, but looking back I
think I only ever found doPress, doDrag and doRelease events from the
Maya API.

- http://help.autodesk.com/view/MAYAUL/2018/ENU/?guid=__cpp_ref_class_m_px_manip_container_html

I bet there is some way to get the hover event though, Maya's clearly
highlighting things as you hover. If not, then depending on how you
draw your manipuator you should be able to do the heavy lifting
yourself. E.g. if your manipulator is a rectangle with a given width
and height, then you could figure out whether your mouse is at the
edge of that. Likewise for more complex drawing, and possibly if you
use the e.g. rotate gizmo you'd be able to take manipulator scale into
account to figure out whether you're near the radius.
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_m...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/bc42d552-a4b4-4be8-b5a0-e5734c18e6a8%40googlegroups.com.
>

mattschiller

unread,
May 23, 2020, 1:30:33 PM5/23/20
to Python Programming for Autodesk Maya
Thanks for the reply. Has anyone found that particular manip hover event? I am not constructing a manipulator, so for my case, i need to know the hover event for any Maya manip.
Reply all
Reply to author
Forward
0 new messages