Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 14-02-2006, 08: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, 02: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, 03: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, 80 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
Reply


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

Thread Tools





A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.