Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   get channel name? (https://simplymaya.com/forum/showthread.php?t=17643)

Dann 27-07-2005 08:11 PM

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 30-07-2005 01:13 AM

anyone?

dannyngan 30-07-2005 01:35 AM

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.

Dann 30-07-2005 01:56 AM

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 30-07-2005 04:17 AM

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?

dannyngan 30-07-2005 08:48 AM

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.


All times are GMT. The time now is 03:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018