Apophis3d
02-07-2008, 11:59 PM
Well this is odd i am getting a syntax error after moving my script which is a work in progress. From a computer at my college to my computer at home. Both of which are running Maya2008.
Maybe I just need an extra set of eyes I might be overlooking something simple.
global proc lights(string $obj)
{
//Varables
string $sel[] = `ls -lt`;
int $num = `size($sel)`;
//creates circle
circle -normal 0 1 0 -name lightSwitch;
//Adds attribute
addAttr -ln "LightBrightness" -at double |lightSwitch;
setAttr -e-keyable true |lightSwitch.LightBrightness;
//locks out unused attributes
setAttr -lock true -keyable false "lightSwitch.sx";
setAttr -lock true -keyable false "lightSwitch.sy";
setAttr -lock true -keyable false "lightSwitch.sz";
setAttr -lock true -keyable false "lightSwitch.rx";
setAttr -lock true -keyable false "lightSwitch.ry";
setAttr -lock true -keyable false "lightSwitch.rz";
//selects lights
if ($num == 0);
error "Nothing selected";
}
Maybe I just need an extra set of eyes I might be overlooking something simple.
global proc lights(string $obj)
{
//Varables
string $sel[] = `ls -lt`;
int $num = `size($sel)`;
//creates circle
circle -normal 0 1 0 -name lightSwitch;
//Adds attribute
addAttr -ln "LightBrightness" -at double |lightSwitch;
setAttr -e-keyable true |lightSwitch.LightBrightness;
//locks out unused attributes
setAttr -lock true -keyable false "lightSwitch.sx";
setAttr -lock true -keyable false "lightSwitch.sy";
setAttr -lock true -keyable false "lightSwitch.sz";
setAttr -lock true -keyable false "lightSwitch.rx";
setAttr -lock true -keyable false "lightSwitch.ry";
setAttr -lock true -keyable false "lightSwitch.rz";
//selects lights
if ($num == 0);
error "Nothing selected";
}
