MGlobal selectFromScreen with custom modelView

111 views
Skip to first unread message

illunara

unread,
Jun 17, 2019, 11:43:35 AM6/17/19
to Python Programming for Autodesk Maya
Hi everybody
I want to select some object under-cursor using maya API, selectFromScene works perfect with origin Maya's viewport. But if i try it with ModelPanel which attach to other Qt's Widget. Things go wrong.

Are there any other way to work around?
Thanks

Marcus Ottosson

unread,
Jun 17, 2019, 2:34:30 PM6/17/19
to python_in...@googlegroups.com
I haven't tested, but maybe `cmds.hitTest` could help you here?


--
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/7b5a1f6c-62ef-4770-80c0-90ff3612db5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuan Nguyen

unread,
Jun 17, 2019, 2:49:54 PM6/17/19
to python_in...@googlegroups.com
Hi Marcus
HitTest work perfect, but only for mesh, or nurbs i guess. I doesn't work with NurbsCurve, Locator...
By the way, i have read your code on github about finding object under mouse cursor . It help me a lots ;)

You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/ujvDox37XTc/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAFRtmOAFysr8S99FGm8o-Rc9rbNOf-mWvtVGDSpiUJq9hLvTxg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages