Expressions through MEL .. need help

Expressions through MEL .. need help

Anonymous
Not applicable
323 Views
2 Replies
Message 1 of 3

Expressions through MEL .. need help

Anonymous
Not applicable
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.
0 Likes
324 Views
2 Replies
Replies (2)
Message 2 of 3

lee.dunham
Collaborator
Collaborator
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;") ;
0 Likes
Message 3 of 3

Anonymous
Not applicable
Ohh.. thanks. Its working now..
0 Likes