Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 08-06-2006 , 06:54 PM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695

shelfButton command

I know I've used this command before, but I can't get it to work today. According to the Maya docs, the following should make a button.
shelfButton -annotation "Print \"Hello\"."
-image1 "commandButton.xpm" -command ("print \"Hello\\n\"");

It doesn't work. It needs to know the parent to know which shelf to put it in. Can anyone remember how to query the active shelf?

Thanks.


*** EDIT :attn:
How came after struggling with something and finally decideing to post looking for help, I always find the solution on my own minutes later?

global string $gShelfTopLevel;
if (`tabLayout -q -isObscured $gShelfTopLevel`) error -sl on "Please make a shelf visible.";
-parent (`tabLayout -q -selectTab $gShelfTopLevel`)


Last edited by Dann; 08-06-2006 at 07:18 PM.
# 2 09-06-2006 , 01:26 AM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Experientia docet - - - Experience teaches

I have found that the more I have learned about MEL, the more often I am able to solve my own problems with coding . . . so I guess that is a good sign for you. . . user added image


"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads