SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 14-02-2006, 07:21 AM   #1
hi2all
Registered User
 
Join Date: Dec 2005
Posts: 11
Thanks: 0
Thanked 3 Times in 3 Posts
Default time delay

Hi,

I tried to follow the instructions in a tutorial about the making of a tail which uses a mel needed to delay the movement of joints, but when I run the mel Maya returns a syntax error. If I change the character ' with " the mel is accepted, though it still not works. This tutorial is a demonstrative part of a chapter about rigging which I've found in a site of books selling.
Is someone able to figure out what's the problem? Any help will be appreciated since I don't get it at all.
Thanks in advance.

Here's the mel:

int $time = 'currentTime -query';
int $delay10 = 'getAttr -time ($time - 10) Hips.ry';
int $delay20 = 'getAttr -time ($time - 20) Hips.ry';
int $delay30 = 'getAttr -time ($time - 30) Hips.ry';
int $delay40 = 'getAttr -time ($time - 40) Hips.ry';
TailRoot.rotateZ = 0 + Hips.rotateY;
Tail2.rotateZ = 0 + $delay10;
Tail3.rotateZ = 0 + $delay20;
Tail4.rotateZ = 0 + $delay30;
TailEnd.rotateZ = 0 + $delay40;
hi2all is offline   Reply With Quote
Old 15-02-2006, 01:31 AM   #2
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Tis but a common error, which happens amoungst those still learning MEL . . . You are using the ' instead of the ` !!!

you may want to avoid also, in the future creating variables named after MEL functions, i.e., try avoiding the use of "$time"
as getting into the habit of doing that could cause some nasty bugs in your program, and make your code confusing too.

It would be ok to do something like :

int $time01 = `currentTime -query`;

Then it is obvious that it is not a MEL function.
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote
Old 15-02-2006, 02:18 AM   #3
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A much easier way of accomplishing what you are trying to do is use the expression editor . . . . it will be your friend if you learn it . . . . you will want to use joints to control the tail, if you are doing animation . . . . this is how I would do it . . .


Create a group of joints, for simplicity, we will say joint1, joint2, etc.

joint2.rotateY = joint1.rotateY *1.1;
joint3.rotateY = joint2.rotateY *1.1;
joint4.rotateY = joint3.rotateY *1.1;
joint5.rotateY = joint4.rotateY *1.1;

So each joint rotates a little more than the previous. When you rotate joint1, it rotates all the other joints via the MEL code.

If you open up the expression editor in the file I have attached and select joint2, then look at "rotateY", you will see the code.

This code is MUCH simpler that whoever-it-was that was trying to write a tutorial . . . and simpler is better and easier to tweak if you need different results . . .
Attached Files
File Type: zip tailexp.zip (107.5 KB, 85 views)
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extremely annoying delay on input boxes in firefox David Members Lounge 0 01-12-2010 05:57 PM

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.