Change BG or Text colour of a attribute in the Channel Box

Change BG or Text colour of a attribute in the Channel Box

snake3y3s
Enthusiast Enthusiast
1,579 Views
3 Replies
Message 1 of 4

Change BG or Text colour of a attribute in the Channel Box

snake3y3s
Enthusiast
Enthusiast

So I have a script that reorders custom attributes in the channel box and allows you to create dividers, I want to add a bit more functionality to it by adding a option to change the colours of the BG of a attribute and maybe the colour of the text.

I found this section in the Maya documentation:

http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/Commands/channelBox.html?_ga=2.176759405....

 

Using the example at the bottom of the page, it does make the channel box attributes black (0,0,0) based on any value starting with "T" and changes the text colour of any attribute starting with the letter "a" but this is not a persistent setting, or does not get saved with your maya scene. It seems to be current maya session only.As soon as you quit Maya and reopen it, it resets to default.

 

Is there a way to have this save with your scene?

Once I can figure that out or get a answer to it, then I can start looking at doing it for selected attributes only.

0 Likes
1,580 Views
3 Replies
Replies (3)
Message 2 of 4

mspeer
Consultant
Consultant

Hi!

 

From the MEL command site:

 

"Note: when setting the color of attribute names, that color is only valid for its current Maya session; each subsequent session will display the default color for the attribute name(s) listed in the Channel Box. Any subsequent attributes that are added to the Channel Box will be affected by prior regular expressions in their current Maya session."

0 Likes
Message 3 of 4

snake3y3s
Enthusiast
Enthusiast

yes... i am well aware of that... i did read it...

 

Im asking if there is a way around it... I.E. Make it persist with your scene...

Found this and he found a way to get it working, so...

 

http://technicaldirector.nl/projects/channel_box_plus/

0 Likes
Message 4 of 4

mspeer
Consultant
Consultant

Hi!

 

The color settings are per Maya session and not per scene-file.

So no, you can't save this per scene.

(The only way would be to save a script inside the Maya file and re-evaluate the script/coloring when opening the scene.)

0 Likes