Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
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 27-07-2005, 09:11 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 get channel name?

Can anyone think of a way to select a channel in the channel box and return the name of that channel?
Dann is offline   Reply With Quote
Old 30-07-2005, 02:13 AM   #2
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default

anyone?
Dann is offline   Reply With Quote
Old 30-07-2005, 02:35 AM   #3
dannyngan
Registered User
 
dannyngan's Avatar
 
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
dannyngan is offline   Reply With Quote
Old 30-07-2005, 02:56 AM   #4
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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.
Dann is offline   Reply With Quote
Old 30-07-2005, 05:17 AM   #5
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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?
Dann is offline   Reply With Quote
Old 30-07-2005, 09:48 AM   #6
dannyngan
Registered User
 
dannyngan's Avatar
 
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
dannyngan 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-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.