Roctren
05-21-2009, 11:34 PM
I've been trying all day to find a way to execute a procedure or scriptJob when a 3D object in a viewport is clicked. I can do it on selection via:
scriptJob -ct "SomethingSelected" ...(run proc)...
however, I am attempting to create a 3D button of sorts and want to keep the previously selected object. Using that aforementioned method inherently means I loose the selection I want to keep.
My main question is can I get a mouse click event with its coords or the object over which was clicked without delving into the Maya API? Or, can it be done with a custom Context? If the latter, would the scene have to operate within that context constantly?
Any insight is greatly appreciated, Thanks.
scriptJob -ct "SomethingSelected" ...(run proc)...
however, I am attempting to create a 3D button of sorts and want to keep the previously selected object. Using that aforementioned method inherently means I loose the selection I want to keep.
My main question is can I get a mouse click event with its coords or the object over which was clicked without delving into the Maya API? Or, can it be done with a custom Context? If the latter, would the scene have to operate within that context constantly?
Any insight is greatly appreciated, Thanks.
