I was trying to ceate some UI using layerButton, somehow can't seems to set the color on layerButton UI control. It will work if I create a layer and set the layer to the control but I don't want to create a layer with it.

window;
columnLayout;
layerButton -label "myLabel" test;
showWindow;

//then when I try to set the color it doesn't work?
layerButton -edit -color 0 1.0 0 test;

any thoughts ?

ftaswin

01-15-2008, 01:21 AM

I don't know if it will help but I use to have problems with -bgc flag when creating color for UI window so I declare a variable first and apply it as a value.

float $r = 1;
float $g = 0;
float $b = 0;

button -bgc $r $g $b;

will return red button. Try it and let us know how it goes

Kelvin88

01-15-2008, 02:01 AM

Base on your post, the problem you are having is you need to indicate whether the layer color is visible or transparent.