|
Im working on simple script in which I want to connect some attributes with sine of Time through MEL
there are 20-40 grass planes. each has “RandValue” attributes in them. There is Main control where I want to Control all plane’s speed by its speed attributes.
...here is the script
string $sel []=`ls -sl`;
for ($eachObj in $sel) {
expression -o $eachObj -s "rx = sin (frame) * $eachObj.RandValue * ctrl.Speed;";
//--- Here the ctrl is control for speed.
but something is wrong and getting errors.
|
|
|
|
There were a couple of problems with your string and the expression.
this seems to work.
string $sel []=`ls -sl`;
for($eachObj in $sel)
expression -s ($eachObj+".rx=sin(time*"+$eachObj+".RandValue)*ctrl.speed;") ;
Lee Dunham | Character TD
ldunham.blogspot.com
|
|
|