CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 01-04-2013, 07:38 PM   #1
New Member
Moscov, Russia
Join Date: Dec 2012
Posts: 2
Bbook Mel scripting for maya animators

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...

// 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?
Old 01-08-2013, 02:03 PM   #2
Jerome Pourcel
Paris, FR
Join Date: Sep 2011
Posts: 45
I'm not familiar with particles scripting but, obviously, you forgot the uppercase :

float $tan[] = `pointOnCurve -pr (age) -nt curve1`;

and not :

float $tan[] = `pointOncurve -pr (age) -nt curve1`;

(assuming that "(age)" is a float or a float variable like $age)

Last edited by depakeen : 01-08-2013 at 02:07 PM.
Old 01-08-2013, 02:41 PM   #3
New Member
Moscov, Russia
Join Date: Dec 2012
Posts: 2

Many Thanks! Problem is solved!
Old 01-08-2013, 02:41 PM   #4
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 04:44 PM.

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