Maya Training

Creating characters In Maya and Zbrush

Maya Training

Creating character renders in Maya 2017 and Arnold

Maya Training

Spach-Alspaugh House the complete courseware
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 08-06-2006, 07:54 PM   #1
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default 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 08:18 PM.
Dann is offline   Reply With Quote
Old 09-06-2006, 02:26 AM   #2
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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. . .
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2017 SimplyMaya - vBulletin® Copyright © 2000-2017, Jelsoft Enterprises Ltd.