Maya 2020 fundamentals - modelling the real world
Get halfway through a model and find it's an unworkable mess? Can't add edge loops where you need them? Can't subdivide a mesh properly? If any of this sounds familiar check this course out.
# 1 18-06-2004 , 10:19 PM
Gun-Kata's Avatar
Registered User
Join Date: Jan 2004
Location: Los Angeles
Posts: 68

scripts, expressions, and procedures

What's the difference between a script, an expression, and a procedure?

# 2 18-06-2004 , 10:35 PM
Subscriber
Join Date: Jan 2004
Posts: 102
Expressions are in procedures and procedures are in scripts? Nice avatar btw

# 3 21-06-2004 , 09:02 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
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
# 4 21-06-2004 , 09:20 AM
Registered User
Join Date: Jun 2004
Posts: 1
a

# 5 21-06-2004 , 11:45 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
wow there's some really useful comments on the board today user added image


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 6 21-06-2004 , 01:33 PM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
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!
# 7 21-06-2004 , 02:40 PM
Gun-Kata's Avatar
Registered User
Join Date: Jan 2004
Location: Los Angeles
Posts: 68
Thanks!

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off