View Full Version : syntax help

01 January 2008, 10:55 PM
I'm trying to utilize this bit of code for a slightly different prupose...

//modifying a large number of vertices with a texture map
float $u, $v;
float $dummy = ramp1.outColorR;
float $minU = 0.0;
float $minV = 0.0;
float $maxU = 1.0;
float $maxV = 1.0;
int $i;
float $disp[] = `colorAtPoint -mu $minU -mv $minV -xu $maxU -xv $maxV -su 101 -sv 101 ramp1`;
string $str = "setAttr pPlane4.pnts[0:10200].pnty";
for( $i = 0; $i < 10201; $i++ ){
$str += ( " " + $disp[$i]);
eval $str;
print $str;

The code about creates an array out of a texture and then displaces the surface.

I want to reuse this code to create an array out of a texture and then sets the goalWeight for a softbody.

Bascially I need to change this one line of code
`string $str = "setAttr pPlane4.pnts[0:10200].pnty";`
to something like
`string $str = "setAttr[0:10200].ptgoalWeight0P";`

CGTalk Moderation
01 January 2008, 10:55 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.