h0tice
08-28-2003, 05:51 PM
hi there mel gurus,
i am currently developing a UI for my lights and got some problem with my check box, here is the mel:
global proc GI_Window()
{
string $myGIWindow = "GIWindow";
if (`window -ex $myGIWindow`)
{
deleteUI $myGIWindow;
}
string $shadOn_sun = `setAttr "Sun.sunShadows" 1`;
string $shadOff_sun = `setAttr "Sun.sunShadows" 0`;
window -w 450 -h 500 -t ("Dome GI Light Editor") $myGIWindow;
scrollLayout -hst 16 -vst 16 -childResizable true;
columnLayout -adj 1;
frameLayout -l "Sun Light Attributes" -w 450 -labelAlign "center" -borderStyle "etchedIn"
-cll true -cl true;
columnLayout -adj 1;
separator -style "double" -w 450 -h 4;
attrColorSliderGrp -w 450 -adjustableColumn 1 -attribute ("Sun.sunColor") -l "Color";
separator -style "in" -w 450 -h 4;
attrFieldSliderGrp -w 450 -adjustableColumn 1 -attribute ("Sun.sunIntensity") -l "Intensity";
separator -style "in" -w 450 -h 4;
checkBox -l "Sun Shadow" -onc "$shadOn_sun" -ofc "$shadOff_sun" -cc "OnOffSunShad();" sunShadow;
separator -style "in" -w 450 -h 4;
attrColorSliderGrp -w 450 -adjustableColumn 1 -attribute ("Sun.sunShadowColor") -l "Shadow Color";
separator -style "in" -w 450 -h 4;
setParent..;
setParent..;
showWindow $myGIWindow;
}
global proc OnOffSunShad()
{
int $OnOff = `checkBox -q -value sunShadow`;
if ($OnOff)
{setAttr "Sun.sunShadows" 1;}
else
{setAttr "Sun.sunShadows" 0;}
}
the window shows after the script is executed but when trying to test the check box there is no effect in the attribute of my curve, i use curve to drive the attributes of my six directional light in the scene.
do i have an error or something?
thanx a lot
i am currently developing a UI for my lights and got some problem with my check box, here is the mel:
global proc GI_Window()
{
string $myGIWindow = "GIWindow";
if (`window -ex $myGIWindow`)
{
deleteUI $myGIWindow;
}
string $shadOn_sun = `setAttr "Sun.sunShadows" 1`;
string $shadOff_sun = `setAttr "Sun.sunShadows" 0`;
window -w 450 -h 500 -t ("Dome GI Light Editor") $myGIWindow;
scrollLayout -hst 16 -vst 16 -childResizable true;
columnLayout -adj 1;
frameLayout -l "Sun Light Attributes" -w 450 -labelAlign "center" -borderStyle "etchedIn"
-cll true -cl true;
columnLayout -adj 1;
separator -style "double" -w 450 -h 4;
attrColorSliderGrp -w 450 -adjustableColumn 1 -attribute ("Sun.sunColor") -l "Color";
separator -style "in" -w 450 -h 4;
attrFieldSliderGrp -w 450 -adjustableColumn 1 -attribute ("Sun.sunIntensity") -l "Intensity";
separator -style "in" -w 450 -h 4;
checkBox -l "Sun Shadow" -onc "$shadOn_sun" -ofc "$shadOff_sun" -cc "OnOffSunShad();" sunShadow;
separator -style "in" -w 450 -h 4;
attrColorSliderGrp -w 450 -adjustableColumn 1 -attribute ("Sun.sunShadowColor") -l "Shadow Color";
separator -style "in" -w 450 -h 4;
setParent..;
setParent..;
showWindow $myGIWindow;
}
global proc OnOffSunShad()
{
int $OnOff = `checkBox -q -value sunShadow`;
if ($OnOff)
{setAttr "Sun.sunShadows" 1;}
else
{setAttr "Sun.sunShadows" 0;}
}
the window shows after the script is executed but when trying to test the check box there is no effect in the attribute of my curve, i use curve to drive the attributes of my six directional light in the scene.
do i have an error or something?
thanx a lot
