Expression Issue
Posted in: Maya——-UPDATE——–
Nevermind. I figured it out!
global proc js_lightSetup ()
{
spotLight;
rename "keyLight";
string $keyLight;
string $kl[]= `ls-sl`;
for ($key in $kl)
{
setAttr ($key+".scaleX") 6.0;
setAttr ($key+".scaleY") 6.0;
setAttr ($key+".scaleZ") 6.0;
setAttr ($keyLight+".intensity") 1.0;
move -r -ls -wd -42.0 102.7 86.0;
rotate -r -os -46.0 -26.0 0;
xform -ws -rp 0 0 0 -sp 0 0 0;
}
select -r $kl;
int $size= size ($kl);
//create fill light
spotLight;
rename "fillLight";
string $fillLight;
string $fl[] = `ls -sl`;
for ($fill in $fl)
{
setAttr ($fill+".scaleX") 6.0;
setAttr ($fill+".scaleY") 6.0;
setAttr ($fill+".scaleZ") 6.0;
setAttr ($fillLight+".intensity") .5;
move -r -ls -wd 37.6 80.6 102.0;
rotate -r -os -31.0 25.0 10.0;
xform -ws -rp 0 0 0 -sp 0 0 0;
}
select -r $fl;
int $size= size ($fl);
//create rim light
spotLight;
rename "rimLight";
string $rimLight;
string $rl[] = `ls -sl`;
for ($rim in $rl)
{
setAttr ($rim+".scaleX") 6.0;
setAttr ($rim+".scaleY") 6.0;
setAttr ($rim+".scaleZ") 6.0;
// expression -s "rimLightShape.intensity=rimLightShape.intensity= keylightShape.intensity * 2/3;";
// expression -s "$rl.intensity=$rl.intensity= $kl.intensity * 2/3;"
move -r -ls -wd 0 76.5 -104.0;
rotate -r -os -142.0 -1.0 0;
xform -ws -rp 0 0 0 -sp 0 0 0;
}
select -r $rl;
int $size= size ($rl);
}
Post a Comment