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`) |
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. . . :alien: |
All times are GMT. The time now is 09:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018