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?
*** 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 08:18 PM.