« Save Our Soho | Home | Oscar In Da House »
MEL: Setting the color for multiple lights
By nikos | May 16, 2008
Here’s a snippet if you want to set the RGB color for multiple lights at once.
colorEditor;
-
if (`colorEditor -query -result`) {
-
string $lights[] = `ls -sl -dag -type light`;
-
float $values[];
-
$values = `colorEditor -query -rgb`;
-
-
for ( $l in $lights ) {
-
setAttr ($l + ".color") -type double3 $values[0] $values[1] $values[2] ;
-
}
-
}
Topics: Maya | No Comments »
Comments are closed.