Eyteneyer
01-04-2013, 06:38 PM
hi there i'm new one on cgforum
I now study the book "Mel scripting for maya animators" and have problem.
I try to make example
Chapter 4 Controlling Particles with Expressions
I create curve1 and emiter1 and under CurveShape1
i try to run runtime after dynamics expression...
float $scaleOffset = 0.2;
float $pos[] = `pointOnCurve -pr (age) -p curve1`;
float $tan[] = `pointOncurve -pr (age) -nt curve1`;
float $norm[] = `pointOnCurve -pr (age) -nn curve1`;
vector $posvec = <<$pos[0], $pos[1], $pos[2]>>;
vector $tanvec = <<$tan[0], $tan[1], $tan[2]>>;
vector $normvec = <<$norm[0], $norm[1], $norm[2]>>;
vector $norm2vec = cross ($tanvec, $normvec);
position = $posvec + ($scaleOffset*$normvec*cos(age*20))+($scaleOffset*$norm2vec*sin(age*20));
And is again and again give me error massage... :drool:
// Error: line 3: Cannot find procedure "pointOncurve". //
// Error: An execution error occurred in the runtime after dynamics expression for prticleShape1. //
Please help! Why is procedure "pointOnCurve" doesn't work? :shrug:
I now study the book "Mel scripting for maya animators" and have problem.
I try to make example
Chapter 4 Controlling Particles with Expressions
I create curve1 and emiter1 and under CurveShape1
i try to run runtime after dynamics expression...
float $scaleOffset = 0.2;
float $pos[] = `pointOnCurve -pr (age) -p curve1`;
float $tan[] = `pointOncurve -pr (age) -nt curve1`;
float $norm[] = `pointOnCurve -pr (age) -nn curve1`;
vector $posvec = <<$pos[0], $pos[1], $pos[2]>>;
vector $tanvec = <<$tan[0], $tan[1], $tan[2]>>;
vector $normvec = <<$norm[0], $norm[1], $norm[2]>>;
vector $norm2vec = cross ($tanvec, $normvec);
position = $posvec + ($scaleOffset*$normvec*cos(age*20))+($scaleOffset*$norm2vec*sin(age*20));
And is again and again give me error massage... :drool:
// Error: line 3: Cannot find procedure "pointOncurve". //
// Error: An execution error occurred in the runtime after dynamics expression for prticleShape1. //
Please help! Why is procedure "pointOnCurve" doesn't work? :shrug:
