Mel - Maya Embedded Launguage

<HOME>   <NEXT>

What is Mel?

Mel stands for Maya Embedded Language. Mel is a scripting launguage. This means that you can type a Mel command and execute that command as soon as you hit Enter. This differs from a compiled language in that a compiled language requires that you convert your code into commands the computer understands. An example of this would be a language such as C. Since Mel is a scripting language, it makes Mel extremely fast to use. Unfortunately, this does not eliminate your having to debug your code. Like any programming language debugging will probably be where you spend the bulk of your time.

Where do we write Mel?

Mel can be executed in several different areas with in Maya, for this class we are only going to concern ourselves with the major areas. You may, if you like, write your Mel externally in a program such as Notepad or UltraEdit-32 and then copy and paste your code into Maya.
commandline

  • This is located in the lower right corner of your screen
  • Command Line
    The feedback line is to the right of the Command Line and will display any printable results.

    Script editor

  • Windows / General Editors / Script Editor
    Script Editor

    Tips on working in the Script Editor:

    • There are two ENTER keys on your keyboard. Use the Numeric keypad ENTER to execute the code.
    • Use ENTER (above the Shift key) to go to the next line.
    • If you highlight the code and hit ENTER, the code will not disappear from the Input Window
    • The Edit menu has some important features:
      • Clear History - clears out the top half (History Panel)
      • Clear Input - clears out the bottom half (Input Panel)
      • Clear All - clears out both halves (History and Input Panel)
    Expression Editor

  • Windows / Animation Editors / Expression Editor

  • Expression Editor
    We will learn more about the Expression Editor later.

    Places to Save Your Scripts

    Shelves
  • This is located near the top of your screen

  • Shelves
    To save a script to the Shelf you can: Saving Script Files outside of Maya
  • There is a folder in your Maya Scripts folder that should be used to save your scripts. Your scripts will have a .Mel extention following the name.

  • <Top>