I'm a new user to maya and extremely new to MEL. I have a nurbs curve and a gravitational field affecting a particle system. I want to link the direction of graviational field to the roration attributes of nurbs curve. I tried the following in the create new expression tab for "direction" attribute of the gravitational field:
{
float $X = 'getAttr nurbsCircle1.rotateX';
float $Z = 'getAttr nurbsCircle1.rotateZ';
gravityField1.directionX = -1*sind($Z);
gravityField1.directionY = cosd($X)+cosd($Z);
gravityField1.directionZ = sind($X);
}
I get tons of errors:
// Error: float $X = 'getAttr nurbsCircle1.rotateX'; //
// Error: Line 1.12: Syntax error //
// Error: float $Z = 'getAttr nurbsCircle1.rotateZ'; //
// Error: Line 2.12: Syntax error //
Please help
![Help user added image](images2/smilies/help.gif)