Code:
string $mySel[] = `ls -sl`;
string $myShapeSel[] = `ls -selection -dag -lf -ap`;
string $name;
string $shapeNode;
string $shapeNodeIntensity;
float $testing;
int $arraySize = `size $mySel`;
//Gen~ obj variable could have just as easily been swapped out for shapeNode
// instead of declaring it above
for ($shapeNode in $myShapeSel) {
//Gen~ now you can ditch this ---> $obj = $shapeNode;
setAttr $shapeNode + ".intensityMult"; //Gen~ set intensityMult to what value?
$testing = (float)$shapeNodeIntensity; //Gen~ shapeNodeIntensity never had a value
// so nothing to convert
print $testing;
}
for ($i = 0; $i < $arraySize; $i++) {
$name = $mySel[$i];
//$shapeNode = $myShapeSel[$i];
//$myShapeSel[$obj] = $shapeNode;
//$shapeNodeIntensity = ($shapeNode + ".intensityMult");
//$testing = $shapeNodeIntensity;
//Gen~ selecting PLC to add attributes is unessecary
// simply add the name of the object you want the command to alter
// at the end of the statement --> addAttr -ln ($name) -at double -k 1 PLC;
select -r PLC;
addAttr -ln ($name) -at double -k 1;
//print $shapeNode;
}