Friday, February 25, 2011
Assignment 3 Part 1: Color Cube
Color Cube with Mel Script
based on what we did in class
Open Maya->Window->General Editor->Script Editor to open the Mel Script Editor
Script
for($x=0;$x<8;$x++)
{
for($y=0;$y<8;$y++)
{
for($z=0;$z<8;$z++)
{
$name=`shadingNode-asShader blinn`;
$tmp=$name+".color";//blinnShader1.color
setAttr $tmp -type double3 ($x/7.0) ($y/7.0) ($z/7.0); //color order
polySphere -ch on -o on -r .03;//ballradius
xform -translation ($x/7.0) ($y/7.0) ($z/7.0);//balldistance
hyperShade -assign $name;
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment