SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / get channel name?
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 27-07-2005, 08: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, 01: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, 01: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, 01: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, 04: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, 08: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
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.