Hi, I'm looking to implement a feature in a rig so that the animator can double click on a rig control and it will select all the objects below the selected one in the pickwalk hierarchy. I have all the pickwalk stuff written and I have a function which can be bound to a hotkey but I'd really like it to be able to be called when the object is double-clicked instead (similar to the way it works in biped).
So this is my question: Does anyone know of an easy way to execute a script when an object in the 3D view is double clicked?
I've started looking into timing the second click after a selection change but it seems like a really ugly solution to me (if it's even possible) so I'm wondering if anyone knows of a more elegant approach.
Replies
EDIT: I know Python can run a separate thread from what Maya though Im iffy about implementation of python in maya though might give you a lead.
Seems that its not even being called and couldnt even find the select script in maya folders.
EDIT: I remember that you could double click menu items to create the object and open the attribute edtor. Took a look at the documentation and there is a flag called -doubleClickCommand(-dcc). Guess that's something you can check out...back to work
Oh and yea I know that some UI elements have double-click callbacks but unfortunately it has to work in the 3D view in this case so I don't think I can make any use of that. Thanks for the input though ^_^
@lamont - yep I know I can't use the UI double click thing. Yea thinking I'll probably go back to try timing clicks.. (ugh)
If anyone knows how to monitor for a viewport click and not lock up maya while a MEL loop is running (so it can check for a click) that would be useful stuff to know
Going to have to leave this till Monday now but I'll be back then and post anything useful I come up with.