Smoothing Script problem

Smoothing Script problem

Anonymous
Not applicable
385 Views
2 Replies
Message 1 of 3

Smoothing Script problem

Anonymous
Not applicable
I am having a problem with this script for turning Smoothing on and off, I am following a tutorial where I am ment to be middle mouse draging this script onto my custom self to create an off button for smoothing but it keeps coming up with //error:Syntax error. This is the first time I have used script so dont really have any knowledge of it at all! :S So any help would be much apreciated. I am using maya 2010 incase thats an issue. The script I am using is below. Thanks Again.


{
string $sSel[] = `1s "polySmoothFace*"`;
string $sItem;

for($sItem in $sSel)
setAttr ($sItem + ".nodeState") 1;

print("Smooth Off\n")
}
0 Likes
386 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
For some reaon my post has pushd the script to the side usually it all indented in with the setAttr being indented twice. Hopetht makes sense.
0 Likes
Message 3 of 3

Anonymous
Not applicable
Try this, it should work:

{
string $sSel[] = `ls "polySmoothFace*"`;
string $sItem;

for($sItem in $sSel)
{setAttr $sItem.nodestate 1;}\\ It does not need ($sItem + ".nodeState), $sItem.nodestate should work well enough

print("Smooth Off\n")
}


By the way, MEL does not heed indentation much - only python kicks up a fuss regarding tabs and spaces.
0 Likes