View Full Version : Buttons on Maya Objects?
05 May 2010, 03:17 PM
I apologize if this matter was posted about before but I didn't see the issue come up in the forums so I figured I would start a thread. The other day I saw this hand rig and noticed something very interesting. The person who made the rig controlled these curves and made a "button" out of them. (I already know about control objects, I just want to know about the buttons specifically on the rig). When you clicked the R shaped curve the hand rig would reset if you had moved it, if you pressed the K curve you could toggle off Maya's ability to keyframe the hand. Personally, I wasn't aware that you could make buttons out of objects within the perspective window so I downloaded the file after seeing the video to investigate. I looked around the hypergraph, the expression editor, found no real connections on the curve to speak of, and I'm clueless as to how this guy made the buttons.
I did a bad job of explaining so here's the video:
and the rapidshare download file:
Any thoughts as to what this person did? It's probably the work of MEL or Python but I still would like to know how to do it if that's the case.
(And as a side note, with the FK controls, how did the rigger make the pivots snap to the joint like it does?)
Thanks for your responses in advance~
05 May 2010, 10:21 PM
The rigger made use of a scriptJob to drive the actions of "mode" and "key" (as he states in the video). It is basically a script that he wrote that is stored within the maya scene itself and is triggered when specific conditions are met. Not for a beginner. Look up scriptJob in the help documents for more info. Also, you can see the scriptJob in his scene through the Expression Editor window.
As for pivots, you can move a pivot by pressing the Insert key to enter "pivot point mode" and move the pivot to where you like. Press Insert again to go back to normal mode.
Hamish McKenzie (http://www.macaronikazoo.com/) wrote some really nice tools that include a UI for setting up the type of script jobs that gonzalimator referred to. zooTriggered lets you make any object into a button that, when clicked, can trigger any command. I wrote a very simple walkthrough, here (http://www.djx.com.au/blog/zootoolbox-guide/zootoolbox-guide-tool-list/zootriggeredwalk-through-part-1/). But that barely scratches the surface of what it can do, so check out the help files as well.
05 May 2010, 02:53 AM
Ah! You're right, I missed that important part of the video. Now I've got some research ahead of me to do. Still, I'm only a beginner in MEL and expressions so this is all new to me. Sounds like fun, I know what I'll be experimenting with for the next few days~
Thanks for your quick replies, you both have been a big help!
05 May 2010, 03:57 PM
you can snap to Bone by pressing the "v" key on the keyboard this is the Snap to Point button, but will allow you to snap to a joint as well.
You can also deconstruct or reverse engineer a rig using the hypershader and showing the inputs and outputs of different parts of the rig. This is a really good place to start.
05 May 2010, 03:57 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.