SimplyMaya Forums

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

Home / forum / Animation / Mel Scripts & Programming / scripts, expressions, and procedures
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 18-06-2004, 10:19 PM   #1
Gun-Kata
Registered User
 
Gun-Kata's Avatar
 
Join Date: Jan 2004
Location: Los Angeles
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default scripts, expressions, and procedures

What's the difference between a script, an expression, and a procedure?
Gun-Kata is offline   Reply With Quote
Old 18-06-2004, 10:35 PM   #2
Immortal1490
Subscriber
 
Join Date: Jan 2004
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Expressions are in procedures and procedures are in scripts? Nice avatar btw
Immortal1490 is offline   Reply With Quote
Old 21-06-2004, 09:02 AM   #3
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

no...

a procedure can be defined and used in a script. If you are familiar with other languages it's basically a function. It takes parametres (but doesnt have to) and returns a value but again doesnt have to.

A script is a bunch of procedures and other code written together to do a specific task. It can have procedures etc.

An expression is typically done on one or more "channels" in maya. E.g. pCube1.tx += 1; in the tx channel will move the cube on a frame by frame basis along the x axis.

Hope that helps a bit
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Old 21-06-2004, 09:20 AM   #4
shahid_hassan99
Registered User
 
Join Date: Jun 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

a
shahid_hassan99 is offline   Reply With Quote
Old 21-06-2004, 11:45 AM   #5
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

wow there's some really useful comments on the board today
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Old 21-06-2004, 01:33 PM   #6
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

In some languages procedures are sub-programs which do not return a value and functions are sub-programs which do return a value. In MEL all sub-programs are called procedures. They can be local or global.
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 21-06-2004, 02:40 PM   #7
Gun-Kata
Registered User
 
Gun-Kata's Avatar
 
Join Date: Jan 2004
Location: Los Angeles
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks!
Gun-Kata 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

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.