syntax help

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  01 January 2008
goalweight syntax help

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";`
blah blah blah

Last edited by gmask : 01 January 2008 at 11:15 PM.
  01 January 2008
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 05:09 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.