Beer glass scene creation
This course contains a little bit of everything with modeling, UVing, texturing and dynamics in Maya, as well as compositing multilayered EXR's in Photoshop.
# 1 27-07-2005 , 08:11 PM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695

get channel name?

Can anyone think of a way to select a channel in the channel box and return the name of that channel?

# 2 30-07-2005 , 01:13 AM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
anyone?

# 3 30-07-2005 , 01:35 AM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
Try working with this for starters:

Code:
channelBox -q -selectedMainAttributes mainChannelBox;
That will return a list of strings based on what you have selected in the top part of the channel box. The channel box in the main UI is called "mainChannelBox", which I found by doing a massive search through all of the MEL scripts used to generate the UI (located inside the main Maya application directory).

You can look up channelBox in the MEL reference to learn more on what you can do with it.


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job
# 4 30-07-2005 , 01:56 AM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks Danny. Funny thing is, I tried doing a search, but never found that one. I'll post the script I'm making with it when I'm done. It's a randomizer script.

# 5 30-07-2005 , 04:17 AM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Hmm. Well it works for the main channel box, but I tried substituting "shapeChannelBox" and variations on that theme. Can you think of a way to do it for any channel box?

# 6 30-07-2005 , 08:48 AM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
mainChannelBox is the entire channel box. You need to change the -selectedMainAttributes flag to whatever is needed to access the shape attributes. The docs on channelBox should give you the options you can play with.


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job
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