MEL Commands and MEL Scripts
Let's be clear; there is a difference between MEL commands and MEL scripts.
The biggest differences between them are:
- MEL commands are the parts that make up a MEL script
- MEL commands constitute a MEL script.
MEL Commands: Hello World!
1. Open the Script Editor
2. In the Scripting Panel:
Write (or copy & paste) the following command statement:
textCurves -t "Hello World!" ;
NOTE: Please be aware of the semicolon at the end of this command statement.
- It's a good - and often necessary - convention to follow.
- This one particular command will work fine without it, but once we start writing scripts with multiple statements, you could end up with a syntax error or bugs in your scripts!
3. Execute:
You actually have a few options to execute this command, choose any one:
- Ctrl + Enter
- Enter (on the numeric keypad)
- Highlight the command statement, then click on the Execute icon (Figure 1)
- Highlight the line, then hold the right mouse button. A dialog box will open up. Select "Execute".
![]() |
| Figure 1: The Execute Icon in the Script Editor |
4. Bask in the splendor of your creation
Once you've executed the code, you'll notice a nurbs curve that says "Hello World!" is generated in your scene! (see Figure 2)
![]() |
| Figure 2 : Hello World! |
Time to pat yourself on the back.
Conclusion:
Let's assume that, for some reason, you have to call on your "Hello World!" command a lot of times throughout your workflow (I know its preposterous, but bear with me!)
Having to constantly find the command statement in the History Panel and then execute the command every time we want to execute the command just isn't good enough!
We're too laz -*ahem*- our time is too important to us!
Next Post:
textCurves -t "Hello World!" ;
Huh? What did we just do? What does that cryptic text mean, anyways?
In the next post, MEL Commands and Arguments, I'll briefly break down what we wrote to give a little insight about what this statement technically means to Maya.


Hi Chris,
ReplyDeleteThis is your teammate, Indra. I used Maya before but never utilized any command line before. I relied heavily on the visible drop-down Maya navigation for almost everything I do. This process, to say the least, wasted a lot of time.
In the later Advanced 3d Modeling class, I did learn a little about setting up some shortcut keys. This helped to speed up the process quite a bit.
However, using command line to access different functionality in Maya is quite new to me. As someone who is not familiar with Mel, I like the way you chunk down your content topic into small bite size. Furthermore, I like your little humorous tone at the end of your post.
Keep up the good work, bro.