View Full Version : mel question
07-04-2003, 04:07 PM
i write some command to set a lot of nurbs surface tessellate to 1.5,but it don not work,can you let me what is wrong
$list=`ls -sl `;
for ($ball in $list)
$shape=`pickWalk -d down $ball`;
setAttr ($ball + ".uDivisionsFactor" + " " + 1.5);
07-04-2003, 04:44 PM
You're syntax on setAttr is slightly off. Try this:
string $selList = `ls -sl`;
for ( $each in $selList )
string $shapes = `listRelatives -c -s`;
for ( $shape in $shapes )
if ( `nodeType $shape` == "nurbsSurface" )
setAttr ( $shape + ".uDivisionsFactor" ) 1.5;
It uses list relatives rather than pickWalking to find the shape nodes. It will also only try if the object is nurbs.
There should be more checks in there, to find out if anything is driving the channel, or if the channel is locked. But it's the fourth o July, and I gots Disneyland to get to!
hope this helps
01-15-2006, 01:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.