PDA

View Full Version : layerButton -color ??


modong
01-12-2008, 07:07 AM
Hey guys,

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, 12: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, 01:01 AM
Base on your post, the problem you are having is you need to indicate whether the layer color is visible or transparent.

Try this


//set transparent to 0
layerButton -edit -transparent 0 test;
//then edit your color
layerButton -edit -color 0 1.0 0 test;

CGTalk Moderation
01-15-2008, 01:01 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.