for ($z = 0; $z < 8; ++$z)
{
for ($y = 0; $y < 8; ++$y)
{
for ($x = 0; $x < 8; ++$x)
{
$ball = `shadingNode -asShader lambert`;
$color = $ball + ".color";
setAttr $color -type double3 ($x/8.0) ($y/8.0) ($z/8.0);
$objname = `polySphere -ch on -o on -r .05`;
xform -translation ($x/8.0) ($y/8.0) ($z/8.0);
hyperShade -assign $ball;
}
}
};
