Non-Mel scripting in Maya?

Non-Mel scripting in Maya?

Post by mark » Sun, 25 Sep 2005 10:49:25

I'm still using Maya 5, and am wondering if it's worth it to upgrade.
My biggest problem is Maya is Mel. I *HATE* mel. I'm a programmer and
have used a lot of programming and scripting languages, and Mel is
hands down the worst scripting language I have ever used.

The ability to script in something other than Mel is a make-or-break
feature for me in Maya. Does Maya 7 let me use something else? Should
I upgrade?

Mark McKay

Non-Mel scripting in Maya?

Post by gimp » Sun, 25 Sep 2005 12:38:10


i'm no programmer but mel is similar to C++ isn't it...? which i
would've guessed is fairly standard for CG development and FX animation
etc, but that's not really my area so i don't know what i'm talking about.


Non-Mel scripting in Maya?

Post by mark » Sun, 25 Sep 2005 19:01:45

Mel is similar to C++ in the same way that a car that has smashed
itself into a lamppost is similar to a car. It actually is more
similar to a unix scripting language called TCL, but it does have C++
elements in it.

Mel lacks the typesafety and data structures that you find in C++. On
top of that, the way to call commands is this ugly, ugly method of
typing shell like command lines directly into the script. These
commands may or may not return all sorts of data types, or nothing at
all. Because nodes are referred to by string names instead of special
node objects, it's really difficult to inspect them. Lines can be
ended with a simple carriage return - no semi colon necessary - which
makes commands ambigious and hard to read.

Add into this a completely screwed up way of testing the scrips. The
only way to compile and run is to 'source' the script in the script
window. Or cut and paste directly into the window body. Both ways are
very slow and error prone. Writing new code and testing it is torture.

Add to the the poor documentation for Mel and the unintuitiveness of
the Mel help files.

And there's little hope of extending Mel beyond the very limited scope
that's deigners intended for it. Other language let you create
sophisticated UIs, have file IO libraries, can use networks, and other
things. It's easy to write modules to add sophisticated behaviour that
can be compiled and stored in files on disk. Mel pretty much lets you
read and write variables and do simple math.

A ten foot tall pile of putrid, rotting corpses would not begin to
describe my contempt for the Mel scripting language. I'm using Maya to
build models for video games, and need to do some sophisticated things
to my meshs with scripts. If I were using a language like Python or
Java, I could do very sophisticated things in a very short period of
time. Using Mel, it takes hours to even do basic things.

Mark McKay

Non-Mel scripting in Maya?

Post by circl » Mon, 26 Sep 2005 05:51:51

In article < XXXX@XXXXX.COM >,

I dunno. I've used a LOT of scripting languages worse than MEL.
Have you thought about getting more familiar with the C API though?
If you liked, with that you could concievably build a module for
Perl or whatever else you like and program in more or less anything
you want.

Non-Mel scripting in Maya?

Post by rando » Tue, 27 Sep 2005 06:21:57

For serious Mel coding you use a program editor such as UltraEdit.
Inside Maya's script editor type:
source test;
-Highlight the code and drag it to the shelf (a mel button appears).
-then select "Save all shelves"
-In your program editor (or even Notepad), type the mel script:
global proc test(){
print "test is running\n";
//your mel code here...
-save test.mel in C:\Documents and Settings\user?\My Documents\maya\6?\scripts
-then press the mel button... the code runs.
The basic procedure is to:
-Write your code in a program Editor,then press <ctrl s>.
-In Maya press the mel button and your code runs.
-Use the script editors history pane for debugging coding
Its fast simple and very easy.

Compared to XSI documentation Maya's documentation is actually quite good.
Before looking at documentation only you have to account to actual netwide
resources that you get with Maya. I have both Maya and XSI and although XSI's
script editor is just as good as Maya, Maya has a wide spectrum of Internet
resources while XSI's has very little.

Lotta negativity... however I have looked at XSI, lightwave and 3DS and their
programming is about the same. They all require an intimate knowledge of CG in
which programming is only an automated extension of a basically artistic
creative industry. I created a basic animation (with no programming) of a mage
staff that glows, lightning swirls around in massed ring around the staff and
then shoots out comet like bolts. Its particle dynamics which is now AUTOMATED
by programming in mel expression. Of course its really all smoke and mirrors
hiding a sequence of controlled particle objects in an arrangement and
complexity that you cannot do without Mel.

As to your negativity, try some downtime.