Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   scripts, expressions, and procedures (https://simplymaya.com/forum/showthread.php?t=12294)

Gun-Kata 18-06-2004 10:19 PM

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

Immortal1490 18-06-2004 10:35 PM

Expressions are in procedures and procedures are in scripts? Nice avatar btw

Alan 21-06-2004 09:02 AM

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

shahid_hassan99 21-06-2004 09:20 AM

a

Alan 21-06-2004 11:45 AM

wow there's some really useful comments on the board today ;)

kbrown 21-06-2004 01:33 PM

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.

Gun-Kata 21-06-2004 02:40 PM

Thanks!


All times are GMT. The time now is 07:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018