MEL For Maya

After the unexpected popularity of my Python For Maya programming course, I had a lot of requests to do a course for MEL.

So here it is, FREE for anyone to access. There’s over an hour of content that goes over the basics of everything you need to know in MEL. It’s not as in depth as the 8 hour Python course, but it should get you up and running with MEL pretty quickly.

Introduction To MEL

In this first video, we are introduced to MEL and compare it Maya’s other programming languages. We also learn how to use the script editor and write our very first, simple script.


Learn Python

If you're interested in learning more about Python, why not sign up for my course here?

This course takes you from learning the fundamentals of Python, to creating tools with advanced user interfaces, all while creating projects you can use immediately.
It will teach you many of the skills necessary to create tools like the ones in this article.

With over 700 students in its' first week, including artists from major studios, it is sure to provide valuable knowledge to everyone.

Python For Maya: Artist Friendly Programming - $70 $90


If you sign up from this link, it will save you $20 off the retail price using the coupon code: DGOVILCOM

Learning By Doing

Maya uses MEL for pretty much everything we interact with. It also tells us every MEL command it runs.

We can use that to learn how to script by using Maya like we normally would, and in this video I teach you to take those commands, how to understand them and finally how to modify them to do what you want.


In this video we learn about using variables. Variables allow us to give names to our data to refer to it easily. In this video we learn about the different types of variables in Maya and how we can use them.


Comments are really useful while coding, because they let us leave notes to ourselves for the future. That way if we come back to code tomorrow, or in a few weeks or even many years, it’s easy to pickup where we left of.

If Statements

In this video, we’ll be going over how to make our code smarter by being able to deal with different situations. I’ll be going over the If/Else statement, the ternary operator and switch cases.


In this video we’ll learn how to use Loops in MEL to iterate over ranges of values or arrays. I’ll be going over the For loop, For Each, While and Do While loops.

Putting It All Together

Now that we’ve learned a lot of the basic skills we need to write a MEL script, let’s put everything we’ve learned together to make a script. Our script will rig any selected objects as a prop for animation.


Probably the biggest tentpole of programming, functions let us group our code together into reusable chunks.

Saving Scripts and Scopes

Now that we’ve written some code that we want to reuse, we’ll probably want to save it for use later. In this video we’ll go over how to save your scripts and then how to source them.

This naturally brings us to another issue called scopes and we’ll go over the access scopes of functions and variables, and how to best use the global keyword.

User Interfaces

Making command line scripts is one thing, but everyone loves to use pretty interfaces! In this video, I’ll be going over how to make a simple window with a few buttons.

External Editors

We’ll quickly be outgrowing the Maya script editor. It’s limited and if Maya crashes, we lose all our work. Instead lets go over how to setup an external code editor that will make for a much nicer coding experience.

Visual Studio Code is a free, multi-platform editor from Microsoft and we’ll learn how to set it up to edit MEL.

Mixing Python and MEL

Sometimes you need to mix languages, because what you’re trying to do is either easier in the other language, or just straight up not possible in your current language. I’ll be going over how to run Python code from MEL, and how to execute MEL code from within Python.


If you’ve made it this far, I’d like to thank you for watching! Even if you just watched one video, thank you for giving it the time.

If you feel like you want to learn more about programming, check out my Python for Maya course. I have thousands of students in the first two months of it being up, with artists from major film and games studios enrolled as well.

Pin It on Pinterest

Share This