Sorry, this page is no longer available
We may earn an affiliate commission when you visit our partners.
Course image
Dhruv Govil

Welcome to Python for Maya: Artist Friendly Programming.

This course will take you from your very first line of Python code to creating advanced user interfaces with all that fluidity we expect of a professional. You'll learn skills that will help you work faster by automating repetitive tasks so you can focus on the work you want to be doing. This can in turn also add incredible value to you on the job market and help you move up the ladder faster.

Read more

Welcome to Python for Maya: Artist Friendly Programming.

This course will take you from your very first line of Python code to creating advanced user interfaces with all that fluidity we expect of a professional. You'll learn skills that will help you work faster by automating repetitive tasks so you can focus on the work you want to be doing. This can in turn also add incredible value to you on the job market and help you move up the ladder faster.

Whether you're a beginner or already familiar with Python, there's a lot this course can offer you. Projects are split up by difficulty and there's a project for you whether you're a modeller, animator, rigger or lighter.

Here's what we'll cover:

  • Python Fundamentals: functions, classes, if statements, etc...
  • Advanced Python concepts like lambdas,partials, regular expressions, etc..
  • Writing User Interfaces with Maya Cmds and Qt
  • Writing data to disk and loading it back in to Maya as JSON
  • Creating command line tools
  • Setting up a professional workflow
  • The Qt interface framework: custom widgets, signals and slots, stylesheets etc

Additionally, this is currently the only course that covers changes introduced in Maya 2017.

You'll have full source code access with comprehensive comments to follow along with, as well as other resources that will help you learn when you're done.

I taught myself Python several years ago when I was an artist, and today hundreds of artists use my tools everyday. I'll be using the same project driven methods to teach you Python.

Ready to start your programming journey? Let's go.

Resources

The most important resource is:

https://github.com/dgovil/PythonForMayaSamples

This has:

  • Links to all the software you'll need.
  • Source code for all our projects with comments.
  • Other resources to further your education.

What are the requirements?

  • Maya 2011 or higher (2017 preferred).
  • A computer with an internet connection

There will be links to everything else you need on the github page.

What am I going to get from this course?

  • You'll have the skills to build tools that will speed up your work.
  • The necessary workflow to build code that can be shared with your team or studio.
  • The necessary skill set that we'd ask of a pipeline developer in major studios.

What is the target audience?

  • Beginners with no programming experience
  • Intermediates with some experience looking to hone their skills
Enroll now

What's inside

Syllabus

We'll go over creating your first script inside of Maya

Welcome to Python For Maya: Artist Friendly Programming

I'm happy you've chosen this course! If you have any feedback or questions, please leave it in the discussions :)

This is just my introduction video to the course. It's the same as the promo video, so feel free to skip it to continue on to the next few videos if you've already seen it.

Read more

Hi, welcome to Python for Maya!

Check out my github page in the resources for this lecture

On there you can find:

  • Code for our projects with comments that you can follow along with
  • Links to the software we'll be using
  • Up to date resources to continue your learning outside of this course

I'll keep this page up to date so that it can be your one stop shop for everything that is needed to supplement this course!

With that out of the way, let's get started!

The script editor is something that can be elusive to people even after years of using Maya, but for our course it will of course be one of our best friends.

It is split into two parts:

  • The Top Section shows you feedback from Maya, including what commands are being run when you click buttons or any errors that happen
  • The Bottom Section is where you can enter your scripts, with the option of which language to use. Of course with our projects we'll be sticking to Python.

It can be invaluable to figuring out how to do things, because if you're stuck you can do the action manually and it tells you exactly what Maya is doing.

Many developers start off by piecing what is happening in the script editor. I'll go over that briefly in our videos, because it is a useful resource, but we'll try not to let it be a crutch for us.

Running Scripts

You can execute scripts in two ways inside the script editor.

  1. If you click the double blue arrow in the script editor toolbar, it will run anything you have either selected or the whole script.
  2. If you select some code, you can then hit ctrl+enter (cmd+enter on macOS) to execute just that.

If you select a variable and run it, Maya will print out the variable. This is the same as doing print variable. This only happens if you select the variable alone. If it's run as part of a larger script, you'll need to be explicit and use print.

Our first line of Python!

This may seem really basic but Hello World is one of the most important lines of code you can write.

It shows that Python is working for you, and that you aren't encountering any errors in your system.

Most importantly though, it shows how easy it is to use Python.

You can find annotated code in the resources for this lecture.

Note: This lesson is short just to get you into Python. Longer videos are to follow! Don't despair. :)

Let's kick it up a notch! Printing names isn't fun, or maybe it is for someone, but let's move on anyway !

The first thing I do whenever I start any 3D application is to create a cube. That is the simplest action that any 3D application should be able to do.

Similarly, it's the simplest thing I should be able to do with Python. So let's try it.

Note: Another short lesson, but the next one will be meatier.

Now this is the real meat of this first project! We'll be creating a animation prop rig using our little companion cube!

We'll go over some key concepts:

  • Getting values back from Maya commands
  • Storing these values in variables
  • Chaining Maya commands together to build our scripts
  • Accessing items inside a list

You can find commented code for it in the resources for this lecture.

We've had our first encounter with variables in the last video, but lets get down and understand them.

This video goes over variables and their types.

Variables can have types which is basically a way of saying what kind of object does this variable refer to. Is it a number, a word, a list or something else completely?

Maya has a few different programming languages that it supports, and each programming language in turn has access to a few different programming libraries inside of Maya.

Programming Languages

Programming Languages are literally the language we use to program. Just like some of us speak English, Spanish, Esperanto or Hindi (not me though), Maya can speak these different languages:

  • Python (Duh otherwise this course wouldn't exist)
  • MEL (The Maya Expression Language)
  • C++
  • C# (Only on Windows)

Programming Libraries

These are the ways the languages can interact with Maya. In English we may say: "Take the elevator" but someone else may say "Take the lift", Maya has multiple ways for the languages to give it directions.

The libraries inside Maya are:

  • cmds : Maya's commands library. Can only be used by MEL and Python.
  • OpenMaya: The Maya API that almost all Maya commands are built around. Very deep access but also complex. Can be used by Python, C++ and C#.
  • OpenMaya 2: OpenMaya 1 was originally designed for C++ which makes it a bit cumbersome in Python. OpenMaya2 is the new Python version, but still in progress. Can only be used in Python
  • PyMel: cmds and OpenMaya were designed for Mel and C++ respectively. PyMel combines both of them to give a very Python friendly library to use. Can only be used in Python.

So you can see, Python gives us the most flexibility of all the languages. This comes at certain costs, but makes it the clear winner for our course.

Many Maya users don't know how Maya constructs objects and object relationships under the hood, but Nodes are a very important concept in Maya and one you should be familiar with before writing more code.

This is a short overview video to describe how nodes work. We won't really be dealing with them much directly, but still great info to have.

There are two major versions of Python: Python 2 and Python 3.

You'd think that Maya would use the latest version, but the vfxplatform.com has chosen to stay on Python 2. There are several reasons for this, but I'd like to go over them now so you aren't confused when you see websites recommending Python 3 instead.

To be clear: If you're doing Maya development, you will be using Python 2. For anything else, feel free to use Python 3.

So you've written out your script, but you want to save it down so you don't lose it? Maybe you want to print it out and frame it? Well let me show you how to do that in this little mini lesson.

If you're interested in learning more about MEL, I've created a short little supplementary course for everyone. It isn't required to do at all for this course, but I've had many requests for it so it's there if you need it.

Object Renamer

This is our first real project.

We'll be creating a script that renames objects in our scenes by appending a suffix to them based on their object type.

In this project we'll learn:

  • How to get help for our Maya commands
  • How to write If statements as well as If/Elif/Else statements to control our logic
  • How to use For Loops to loop through lists
  • How to setup and use PyCharm
  • Create Functions to contain our code
  • Learn to use Dictionaries
  • Use string formatting to create complex strings
  • Learn about scopes in Python

It may seem like a lot, but each concept is broken down into bite sized pieces to go over them.

You can find code for it in the resources for this lecture.

No developer comes into this world magically knowing every command that Maya has. Well maybe someone does, but it would be an odd skill for a baby to have.

So instead, for the rest of us mere mortals, there's some pretty good documentation about each Maya command and we'll go over how to look up and read this documentation.

The LS command is used to list objects in the scene, and you can give parameters to it to narrow down the list it gives back.

In this video we'll go over how to use the ls command properly to get back just the items we care about.

If Statements are powerful ways to control our logic so that we only run parts of our code when certain conditions are met.

For example, we wouldn't start a party without some sweet tunes, so in Python we could tell it to only do it if the music is there.

Indentation

An important thing to note here is that Python handles two different kinds of indentation:

  • 4 spaces
  • 1 Tab

Spaces are always preferred. Anyone who says otherwise is a loony. Sometimes you will be changing someone elses code that uses tabs instead of spaces. That is the only time I can recommend tabs, but I also recommend cursing at them.

Fortunately, PyCharm by default converts tabs to spaces, so you won't be hitting a space bar multiple times. Just hit the Tab key once, and it will add 4 spaces. It is also smart enough to understand the current code, and do the best behavior accordingly.

IMPORTANT: Never mix tabs and spaces. It's a world of pain. Use one or the other, and most good editors will let you use tabs, but convert it to spaces for you.

For Loops are another core programming principle. They let us run the same logic for every item inside of a collection (lists, dictionaries, sets, tuples etc..).

Noone wants to write the same code for every single item in a list, especially when some lists can be thousands or millions of items long. So we use a for loop to tell python to run it on each item sequentially.

While Loops are like the child of the if statement and for loop.

They run as long as a condition is met. These are useful when you don't know exactly how many loops you need to run, but you know that when the condition is met, that you can stop.

Think of looking for your keys. You don't know how many times you'll walk around the house looking for them, but once you find them you know you can stop.

Often, we need to know the type of the object in Maya. Are we dealing with a joint, a mesh or something else entirely? This is probably one of the most common things to do in Maya and in this lesson we'll go over how to find what kind of object you have.

The desired behavior is that if an object has no other children other than it's own shape, then we'll give it a suffix that represents it's shape type, but if an object has multiple children, we'll treat it as if it's a group. This also applies if a geometry object has children because it has a mesh shape as a child as well.

You can find the source code link in the resources.

In case you do want to always rename an object by it's shape type, then please make the following change:

    # Add the shapes=True to only get its shape children
    shapes= cmds.listRelatives(obj, children=True, shapes=True) or []

    # If there were shape children, get the type of the shapes
    if shapes:
        objType = cmds.objectType(shapes[0])
    else:
        # otherwise get the object type of the object itself
        objType = cmds.objectType(obj

If Statements are cool, but what if you have multiple conditions you want to check for? Or if you want to tell Python to do something if the condition isn't met?

Like if we can't start the party then lets go to sleep. Similarly we can tell Python what to do quite easily when different conditions occur.

NOTE: There is a bug in the latest version of PyCharm that doesn't let you set mayapy.exe as the Python interpreter. Fortunately it's not completely necessary and you can skip that part, and simply add the completion files as shown in this video. I will file a bug report with Jetbrains to get this sorted.

So as much as I like the Maya script editor, it's kind of a drag when your script becomes larger than a few lines of code.

This is where PyCharm comes to the rescue. Not only is it great for large code, it also gives you ton of help while coding. It's a programmers best friend.

In this lesson, we'll go over the proper setup of PyCharm for Maya.

In this lesson we'll go over containing our code within functions for easy use.

Functions are another core principle of programming. They're basically commands that you're telling the computer to run, and they can take optional details called arguments or parameters.

For example, you ask Dave to get you apples, but you can also tell him how many apples to get. The getting of the apple is a function, and how many is the parameter.

We'll now go over Dictionaries which are a type of object in Python used to store relationships.

A real world Dictionary (think Oxfords Dictionary) stores the relationship between a word and it's definition. Similarly Python dictionaries store the relationship of a key and a value, where the word is the key and the definition is the value.

Python has many, many, many ways to combine words together to make sentences or other words. This is called String Formatting and it's probably the thing I spend the most time doing at work.

There are multiple ways to format strings in Python and I'll go over all the ones that work in Python 2. There are actually more ways in Python 3.6, but we're limited to Python 2.7 for Maya

Variables in Python have a scope. Scopes are the life span of a variable, and when they reach the end of their scope they are cleaned up.

A real world analogy would be of a candy bar. When you are done eating it for desert, you throw it away. In this case, the candy bar is the variable and the desert is the scope. You can't use the candy bar before desert or your mom will get mad at you, and once it's thrown away you don't want to be sorting through the garbage.

The Gear Creator project will teach us the following skills:

  • Creating geometry using Python
  • Modifying the geometry using Python
  • Creating our own object types in Python, called Classes
  • Converting from functions to classes

As usual, the code is available in the resources for this lecture.

So far we've been starting our scripts inside of Maya. This video instead goes over how to create our scripts in PyCharm instead and then access them in Maya.

Now lets create the gear itself!

We'll learn to:

  • Create the pipe for the base of the gear
  • Select the faces that will become the teeth of the gear
  • Extrude those faces

The code for this video is available in the resources.

So we've got a gear, but the director wants to change all the pretty gears we've worked so hard to make.

We could delete them all, OR, we could modify them to match his new visionary idea for more teeth on the gears.

In this lesson we'll go over modifying the gears we created.

Code is here: https://github.com/dgovil/PythonForMayaSamples/blob/master/gearCreator/gears1.py

Classes are a way in Python to create a custom object type. Just like we have a string, an integer, a float etc..., we can have our custom object types that define a way to interact with them.

Now that we've learned about how amazing Classes can be (when used judiciously), we can go on to converting our functions into a Gear class.

Code is available in the resources for this lecture.

Animation Tweener

Calling our scripts from the script editor is alright, but noone wants to be typing commands all the time. This isn't the 60s anymore. So lets make a User Interface for our tools!

We'll be making an Animation Tweener that adds inbetween keys to existing animation.

In this project we'll learn:

  • How to interact with time in Maya and animation controls
  • How to make a user interface with Maya cmds
  • How to connect parts of an interface to functions
  • How to reuse our interface to make multiple other ones so we don't have to type the same code

Code for this project is available in the resources of this lecture.

Maya has a few different libraries we can use for making user interfaces. Largely they all now use the same library under the hood (Qt) but these are the 4 different ways to access it:

  • Maya cmds has a subset of Qt that you can use from Python or Mel.
  • Qt is a C++ library that you can you use from C++
  • PyQt and PySide are Python wrappers for Qt so that we can use Qt from within Python directly.

This project will use Maya cmds, since a lot of maya code uses it, but the next few will switch over to PyQt/PySide instead.

Before we get into writing our UI, it's always important to write the logic for it first. This lets us test the logic without the UI to see if it's working on its' own, but also it means that other tools can use our functions without needing to use our UI.

So for that reason, we'll start our project by writing the Tween Function to add keys inbetween other keys.

This is the first of two videos in which we'll be getting the time and object selection from Maya so we have the necessary information to perform our tween.

Now that we have our time and object selection, we can figure out how to calculate the value of the key that we'll be placing.

In this video we'll go over:

  • Querying Keyframe values on other frames
  • Calculating the value of our keyframe
  • Setting a keyframe

With our logic out of the way, lets make our User Interface so we can simply drag a slider to set the value of the inbetween key.

It's a lot of work to create a user interface, and we have to repeat that each and every time we make one. If only there was a way to reuse our code! The answer is : Classes!

In this lesson we'll go over taking the code from our TweenerUI and sharing it with a new UI for our Gear Creator

This short lesson shows how to add scripts to the Maya shelf so that you can access them easily without using the script editor each time.

Controller Library

In the last project we learned to make UIs with the Maya cmds library. In this project, we'll switch to using Qt instead because it lets us have way more flexibility in how our UIs are made.

This project will show you:

  • The advantage of Qt over Cmds
  • Writing Qt code that can work across Maya versions
  • Using Qt.py: A wrapper for the multiple Qt libraries in Python
  • Interacting with the OS to make directories, and save and read files
  • Creating screenshots
  • Making a gallery UI that lets us select what controller to load in
  • Using Signals and Slots in Qt to connect our UI to functions.

Code is available in the resources of this lecture.

Qt has a long history in earning itself a spot as the most popular cross platform UI library around. Seriously, it's amazing.

Anyway I figure it's good to know why it exists, and why we need it, so this lesson goes over exactly that.

Okay so we know what Qt is, and we've used cmds, but I really want to drive home why you should prefer using Qt where ever possible.

"If it walks like a duck, sounds like a duck then it must be a...."

This is a bit of a digression. I've mentioned Duck typing and it isn't about hitting your keyboard like a duck (How would a duck type anyway?).

Duck Typing is a concept in many programming languages that support Classes, where different classes can behave the same so you can use them in a similar manner without having to know what it is.

Whereas cmds requires you to know what type each UI element is in case you need to modify it, Qt objects let you modify them directly without needing to know what they are.

If you're writing Qt interfaces for Maya, you have a problem today. There are 4 different ways to use Qt, and neither is a clear winner.

  • PySide comes with Maya 2011 - Maya 2016 and uses Qt4
  • PyQt4 also uses Qt4 and is often nicer than PySide but doesn't come with Maya.
  • PySide2 comes with Maya 2017 and above and uses Qt5
  • PyQt5 again uses Qt5, but doesn't come with Maya but is nicer than PySide2 to use.

Additionally each of them do things slightly differently. It can be quite hard to support them all. Or Not.

There's a library called Qt.py that lets you just use it, and it takes care of all the differences for you so that you can sleep peacefully at night knowing your code is safe and sound.

A link to Qt.py is available in the resources for this lecture.

NOTE: In the video I say to use the direct download from Github. Instead, use the releases page: https://github.com/mottosso/Qt.py/releases

This will give you a more stable release than the one from the main page. I'll reupload the video soon with the changes, but just want to make that note here first.

Okay, now we know what Qt is....how do you just get it started? Well first we need to import it and depending on your Maya version this can be different.

This video goes over those differences, so you don't get tripped up when you run into them.

Phew, we have that Qt preamble out of the way, lets get our hands dirty with code.

But we can't start our UI just yet! Remember, we need to make the logic for our code first.

In this video, we'll go over creating the directory to where we'll be saving our controllers.

Now that we have a nice clean directory to save our lovely controllers to, lets go about writing out the code to save our controllers down.

Sweet, our controllers are written to the directory, but now we need to find them so that we can access them.

In this lecture, we'll go over finding files on your computer using Python.

We've saved our controllers, we've found them and now we need to Load Them!

In this lecture, we'll go over loading back in the controllers we saved down.

Uh Oh! We have a bug in our code! But don't fret, this is super common. I have bugs in my code all the time, it's like a developers right of passage. Heck, some of us have even brought down whole studios with a simple bug (not me though...I swear! )

So lets find our bug, squash it and carry on with our lives!

We may want to write additional data along with our controllers. We can use a file format called JSON which is a very common data storage format to store our data.

This lecture goes over writing out the data to JSON and then reading it back in.

Lets also save down some screenshots of our controller so we can know what it looks like.

Hooray, our logic is done! Can we start the UI now?

Almost, my friend! Before we start the UI, let me show you where you can find help regarding Qt should you get lost.

Yes! Now we can start by showing our window! Never have you seen such a pretty grey box.

In this lecture we'll go over setting up the basis for our user interface, and some common issues that people run into.

We can now start adding interface elements to our window to actually make it useful.

We'll go over adding buttons, textboxes and lists, as well as laying them out in a nice ordered fashion.

Our last video left us with the controllers just being listed out. I want them laid out as a nice gallery of thumbnails though, so in this lecture we'll be going over how to achieve that.

In this short lecture, I'll introduce you to the concept of Signals and Slots in Qt. These are the backbone of how Qt interfaces actually work.

Signals are events that an interface element will say has happened. For example, when a button is clicked, it sends out a signal saying that an event has happened where it has been clicked.

Slots are the other side of a signal. You connect slots to a signal, so that Qt automatically runs that slot when the signal is emitted. Slots are just a fancy name for a function.

Now that you understand the theory behind Signals and Slots, let's use them to connect up our UI so that it can function.

The Light Manager

In this project we'll make a UI to create, manage and edit lights in our scenes. It will also write out the lights and read them back in using just JSON.

We'll learn the following skills:

  • Using PyMel and when to use PyMel and when to use Maya cmds
  • Making our own custom interface controls in Qt
  • Using the OpenMaya API to combine Maya controls with our Qt controls
  • Using Anonymous functions with Partial and Lambda
  • Using Loggers
  • Writing portable code that can be used in any version of Maya

Code is available in the resources for this lecture.

PyMel is another Python library inside Maya.

It can really help clean up your code and make Maya a lot easier to use. It does have several drawbacks in terms of speed and stability so several studios don't allow its use, but it is very useful otherwise and I think it's very useful to learn it.

This project will have less preamble and we'll be jumping right in!

This lecture covers the following:

  • Starting the Qt UI like we did in the previous project.
  • Using partial to store values for a function that we'll call later

We need a custom user interface that does more than the built in Qt ones do. Fortunately Qt lets us build our own using other Qt elements.

This lecture covers:

  • Creating a custom Qt Widget for our needs by combining other ones together
  • Using lambda which is a way to define a single line function without a name.

Often we'll use lambdas for when we don't want to create a whole function because we won't be using it more than the one time, and they're simple by nature.

NOTE: In the video I forget to add the second "QtWidgets.QSizePolicy.Maximum" parameter for the vertical value of "scrollWidget.setSizePolicy". It should be scrollWidget.setSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)

See line 188 here: https://github.com/dgovil/PythonForMayaSamples/blob/master/lightManager/lightManager.py#L188

This lecture is a continuation of the last one as we finish up the behavior of our custom widget.

This video will cover:

  • Creating buttons to hide the lights
  • Creating a custom Qt Signal to tell other lights to hide instead
  • Making a slider to control our light intensity

In this video we'll continue from where we left off and add the ability to change the color of our light.

We'll go over:

  • Calling Maya's color picker from Qt
  • Using Qt Stylesheets to style our color button
  • Converting between different color ranges

This lecture covers two important topics:

Portable Code

Unfortunately, like we learned earlier, the different Qt libraries have some differences, and while Qt.py tries its best to handle them all, there are a few it can't.

This lecture goes over writing code that can work across all Qt libraries.

You likely won't need this, and likely have chosen to stick with just one. Still, I cannot predict which one you chose as it depends on your setup and Maya version, so this video will cover all of them so you can pick the bits you need.

Loggers

Python has a great way of controlling what information gets reported by using loggers. These are like print statements on steroids that you can enable and disable across your code very easily.

This lecture goes over combining Maya interface controls with our own Qt controls.

We'll go over:

  • How to parent our UI under Maya directly so we don't need to store it in a variable
  • How to make our UI dockable

Note: If you're using Maya 2016 or below, the portion of this lecture that handles the docking uses a different Maya control than in 2017 and above. I have the code here: https://github.com/dgovil/PythonForMayaSamples/blob/master/lightManager/lightManager2016Below.py

The sections that are different are in the LightingManager's __init__ method, the getDock and deleteDock functions. They are marked with MAYA2016 so should be easy to find.

If you find that at all confusing, or get stuck, ask a question in the Q&A section and I'll respond as soon as I can.

Another Python fundamental is Try and Except. This concept lets us say that we should try something out, and if it doesn't work, then do something else.

For example if you try to eat a pie and it's too hot, you'll instead go and drink water rather than stop and be in pain.

Now that our Light Manager is pretty complete, we want to be able to save our lights down as a JSON file that we can share with other people.

In this lecture we'll go over doing just that.

We've saved down all these light rigs as JSON files, but we need to be able to read them back in to Maya so that we can load back our old lighting setups or use some that other people have built.

Python isn't just useful inside of Maya, in fact it is super useful outside of it. To show that, we'll be creating a nice little file renaming utility.

This lecture goes over:

  • Running scripts in the command line
  • Creating an argument parser to understand the paremeters we are giving our script

Continuing on from our last video, we'll now go over:

  • Renaming files
  • Duplicating files
  • Using regular expressions (a.k.a regex) to use name patterns to be more particular in how we rename our files.

While we've covered several of the most common libraries you will be using, we haven't been able to fit in two other common libraries.

Sys

Sys is a module in python that lets you access system information, including the version of Python being run, what modules are loaded and where Python will look for other modules.

Subprocess

Subprocess lets you launch external applications from Python. This is really useful for example to call preexisting applications rather than having to redevelop your task in Python, or just launching an application for your user.

e.g. We can launch an image editor to edit the screenshots we save out in the Controller Library project

This course has used PyCharm as its' primary editor, but there are many others out there.

In this video, I'll go over a few of the more popular options.

Sublime text is one of my favorite editors other than PyCharm. It's weird that people have favorite editors, but when you're working in them all day, you kind of develop that.

This lecture goes over setting up Sublime Text for Maya.

Eclipse is also another common editor that can be setup to work with Maya. I'm not it's biggest fan, but you might work in a studio that uses it so I'll leave this little guide to setting it up.

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Provides a solid foundation in Python programming concepts, including functions, classes, and control flow, which are essential for automating tasks in Maya
Covers advanced Python concepts like lambdas, partials, and regular expressions, enabling artists to write more sophisticated and efficient tools for Maya
Explores writing data to disk and loading it back into Maya as JSON, which is useful for creating shareable and reusable assets and configurations
Teaches writing user interfaces with Maya commands and Qt, empowering artists to create custom tools with intuitive and artist-friendly interfaces
Focuses on Python 2.7, which is an older version, but it is still the standard for Maya development, so learners may need to adapt to newer versions later
Requires Maya 2011 or higher, with 2017 preferred, so learners may need to acquire or upgrade their Maya software to fully benefit from the course

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Practical python scripting for maya artists

According to learners, this course provides a practical, project-based approach to learning Python for Autodesk Maya. Students appreciate how it is genuinely artist-friendly, starting with the basics and gradually introducing more complex concepts. The instructor's teaching style is frequently highlighted as clear and easy to follow, making programming accessible even for complete beginners. The course covers crucial topics like Maya cmds, Qt for user interfaces, and introduces PyMel and the OpenMaya API, which students find highly valuable for creating useful tools to automate tasks and improve workflow. While generally very well-received, some note that the pace can be fast in certain sections, particularly when transitioning to more advanced areas, suggesting that some parts may require additional study or practice to fully grasp.
Course uses Python 2 due to Maya.
"The course correctly focuses on Python 2 as required by Maya, but it's important to remember this isn't modern Python 3."
"Understandably uses Python 2.7, which is necessary for compatibility with most Maya versions."
"While not a negative, students should be aware they are learning Python 2, not Python 3."
Helpful source code examples on GitHub.
"Having the source code on GitHub with comments was extremely helpful for following along and reviewing."
"The GitHub repo is a great supplementary resource for the course material."
"Being able to download and run the project files made practicing much easier."
Covers cmds, Qt, PyMel, and OpenMaya basics.
"Getting introduced to Qt for building UIs was a major highlight of the course for me."
"Learning about PyMel and getting a glimpse into the OpenMaya API was very valuable."
"The transition from cmds to Qt in the UI section is handled well and shows the benefits of using Qt."
"Covers the necessary Maya-specific libraries needed for rigging, animation, and modeling tasks."
Instructor is clear, patient, and knowledgeable.
"The instructor is fantastic at explaining complex topics in a simple, understandable manner."
"I appreciated the instructor's pace and patience throughout the lessons."
"It's clear the instructor has real-world experience using Python in a studio environment."
"Videos are well-produced and easy to follow along with."
Accessible explanations for non-programmers.
"As an artist with zero programming background, this course finally made Python click for me."
"The explanations are broken down in an artist-friendly way, avoiding overly technical jargon where possible."
"I never thought I could learn to code, but the instructor makes it feel achievable and not intimidating."
"Starts from the very basics of Python and Maya scripting, perfect for someone new to both."
Learn by building useful tools for Maya workflow.
"Building the UI with Qt was challenging but seeing the functional tool at the end was very rewarding."
"The hands-on projects like the Controller Library and Light Manager are incredibly useful for real-world Maya work."
"I immediately started using the concepts taught to build tools that automate my repetitive tasks in Maya."
"The project-driven structure made learning feel practical and directly applicable to my artistic workflow."
Some advanced topics might feel rushed.
"While the beginning is great for beginners, some later sections introducing more advanced concepts move quite quickly."
"I had to pause and rewatch videos when learning about Qt signals/slots and the OpenMaya API."
"More practice exercises or challenges in certain areas would be beneficial."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Python For Maya: Artist Friendly Programming with these activities:
Review Python Fundamentals
Solidify your understanding of core Python concepts like variables, loops, and functions before diving into Maya-specific applications.
Browse courses on Python Basics
Show steps
  • Read a Python tutorial covering basic syntax and data structures.
  • Write small programs to practice using loops, conditionals, and functions.
  • Review online resources and documentation for Python fundamentals.
Brush up on Linear Algebra
Refresh your knowledge of linear algebra, which is essential for understanding transformations and manipulating 3D objects in Maya.
Browse courses on Linear Algebra
Show steps
  • Review matrix operations and vector math.
  • Practice applying transformations to simple geometric shapes.
  • Study linear algebra concepts relevant to 3D graphics.
Read 'Maya Python for Games and Film'
Supplement your learning with a dedicated book on Maya Python to gain a deeper understanding of the subject.
Show steps
  • Read the book cover to cover.
  • Work through the examples provided in the book.
  • Experiment with the code and adapt it to your own projects.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Collaborate with peers
Engage in peer practice sessions to reinforce your understanding of Python scripting in Maya and learn from others' experiences.
Show steps
  • Form a study group with other students.
  • Share code and discuss challenges you're facing.
  • Work together on small scripting projects.
Create a custom shelf tool
Start a project to create a custom shelf tool that automates a repetitive task in Maya, solidifying your understanding of Python scripting and UI development.
Show steps
  • Identify a repetitive task in Maya that can be automated.
  • Write a Python script to perform the task.
  • Create a custom shelf button to run the script.
  • Test and refine the tool based on user feedback.
Document your custom tool
Create documentation for your custom tool, explaining its functionality and usage, to reinforce your understanding and share your knowledge with others.
Show steps
  • Write a user guide for your custom tool.
  • Create a video tutorial demonstrating its usage.
  • Share your documentation with the community.
Contribute to an open-source Maya tool
Contribute to an open-source Maya tool project to gain experience working in a collaborative environment and learn from experienced developers.
Show steps
  • Find an open-source Maya tool project on GitHub.
  • Fork the repository and set up a local development environment.
  • Identify a bug or feature to work on.
  • Submit a pull request with your changes.

Career center

Learners who complete Python For Maya: Artist Friendly Programming will develop knowledge and skills that may be useful to these careers:
Technical Artist
A technical artist bridges the gap between artists and programmers, and this course helps you become one of them. The role of a technical artist is to develop and maintain tools and workflows that allow artists to create high-quality assets efficiently. By learning Python and how to use it within Maya, you can automate repetitive tasks, create custom tools, and streamline the art creation process. This course, in particular, gives you the necessary skills to build tools that will speed up the work of artists. You will also have the necessary workflow to build code that can be shared with your team or studio. The course covers creating command line tools, setting up a professional workflow, and writing user interfaces using Maya commands and Qt. These are all skills used by the technical artist.
Pipeline Developer
Pipeline developers create and maintain the software infrastructure that supports the entire production process, and this course helps provide the necessary skillset. This role requires a strong understanding of Python and its integration with Maya, as well as the ability to develop custom tools, automate tasks, and create efficient workflows. This course can especially help you gain the necessary skill set that is expected of a pipeline developer in major studios because the course covers the the Qt interface framework: custom widgets, signals and slots, stylesheets etc. The course also provides the necessary workflow to build code that can be shared with your team or studio.
Tool Developer
Tool developers specialize in creating custom software tools to enhance the capabilities of digital content creation pipelines. This course helps in developing the skills to create and tailor tools specifically for Maya. This includes automating complex tasks, improving workflow efficiency, and solving unique production challenges. This course allows students to build tools that speed up their work. They will also have the necessary workflow to build code that can be shared with their team or studio. The tool developer should especially consider this course as this is currently the only course that covers changes introduced in Maya 2017.
Software Engineer
Software engineers design, develop, and test software applications, and this course can help with a specialization in visual effects. By learning Python and its application within Maya, software engineers can develop tools and plugins that extend Maya's functionality, automate tasks, and improve the overall user experience. This course covers Python fundamentals and advanced Python concepts, such as lambda functions, partial functions, and regular expressions. It also covers writing user interfaces with Maya commands and Qt, writing data to disk and loading it back into Maya as JSON, and creating command line tools. These aspects of the course will all be helpful to a software engineer wishing to specialize in visual effects.
Character Technical Director
A character technical director focuses on the technical aspects of character creation and rigging, and this course helps provide the necessary Python scripting skills. By learning Python and how to use it within Maya, you can develop custom rigging tools, automate character setup processes, and ensure the technical integrity of character assets. This course gives you the skillset that is asked of a pipeline developer in major studios. The course also provides you with the necessary workflow to build code that can be shared with your team or studio. The course covers the Qt interface framework: custom widgets, signals and slots, stylesheets etc.
Rigger
Riggers create the underlying control systems for characters and other assets, enabling animators to bring them to life. This course may be useful by teaching you to automate rigging processes, create custom rigging tools, and develop efficient workflows. Knowing Python and how to integrate it with Maya allows a rigger to streamline their work, create more complex and sophisticated rigs, and solve challenging technical problems. The skills you learn in this course will allow you to work faster. You will also be able to automate repetitive tasks so you can focus on the work you want to be doing. The course covers advanced Python concepts and writing user interfaces with Maya commands and Qt. Riggers should consider this course because projects are split up by difficulty and there's a project for you whether you're a modeller, animator, rigger or lighter.
FX Technical Director
An FX technical director specializes in the technical aspects of creating visual effects for film, television, and games. This course helps in that endeavor. By learning how to use Python within Maya, you can develop custom FX tools, automate complex FX setups, and solve challenging technical problems. This course gives you the necessary skills to build tools that will speed up your work. You will also learn the necessary workflow to build code that can be shared with your team or studio. The course covers the Qt interface framework: custom widgets, signals and slots, stylesheets etc.
Creative Coder
Creative coders use programming to create art, interactive installations, and other innovative experiences, and this course helps with that mission. This course can assist in learning Python and how to use it within Maya. Doing so allows you to push the boundaries of what is creatively possible, develop unique tools, and bring your artistic visions to life. This course, in particular, is currently the only course that covers changes introduced in Maya 2017. The skills taught include Python fundamentals and writing user interfaces with Maya commands and Qt.
Animator
Animators breathe life into characters and objects, and this course may be useful for animators who want to enhance their skills. It teaches the basics of automating animation tasks and creating custom animation tools to streamline their workflow. With Python scripting in Maya, animators can accelerate repetitive actions, generate complex animations, and explore new creative possibilities. This course covers writing user interfaces with Maya commands and Qt, writing data to disk and loading it back into Maya as JSON, and creating command line tools. The course may be beneficial to animators because projects are split up by difficulty and there's a project for you whether you're a modeller, animator, rigger or lighter.
Lighting Artist
Lighting artists create the mood and atmosphere of a scene using lighting techniques in Maya, and this course may be useful for automating repetitive lighting tasks. By learning to write Python scripts, lighting artists can streamline their workflow, create custom lighting tools, and experiment with new lighting effects. The course covers writing user interfaces with Maya commands and Qt, writing data to disk and loading it back into Maya as JSON, and creating command line tools. The course could be helpful to lighting artists because projects are split up by difficulty and there's a project for you whether you're a modeller, animator, rigger or lighter.
3D Modeler
A 3D modeler creates three-dimensional assets for use in various media, and this course may be useful for learning Python to automate repetitive tasks and create custom modeling tools. By learning to write Python scripts, 3D modelers can streamline their workflow, create complex models more efficiently, and enhance their creative capabilities. This course covers writing user interfaces with Maya commands and Qt, writing data to disk and loading it back into Maya as JSON, and creating command line tools. The course could be useful to 3D modelers because projects are split up by difficulty and there's a project for you whether you're a modeller, animator, rigger or lighter.
VFX Artist
VFX artists create visual effects for film, television, and games, and this course may be useful for learning Python to create custom tools and automate tasks in their workflow. With programming skills, VFX artists can enhance their creative capabilities, develop unique effects, and solve complex technical challenges. This course covers Python fundamentals and advanced Python concepts, such as lambda functions, partial functions, and regular expressions. It also covers writing user interfaces with Maya commands and Qt, writing data to disk and loading it back into Maya as JSON, and creating command line tools. These features may be helpful to a VFX artist.
Simulation Artist
Simulation artists create realistic simulations of physical phenomena, such as cloth, fire, and water. This course may be useful for expanding the range of simulations that can be created in visual effects. Programming can allow you to create custom simulation tools, automate simulation processes, and push the boundaries of what is possible with visual effects. The course covers Python fundamentals and advanced Python concepts, such as lambda functions, partial functions, and regular expressions. It also covers writing user interfaces with Maya commands and Qt, writing data to disk and loading it back into Maya as JSON, and creating command line tools. These features may be helpful to a Simulation Artist.
Virtual Reality Developer
A virtual reality developer creates immersive experiences for virtual reality platforms, and this course may be useful for developing interactive elements and tools within VR environments. This course could allow you to learn Python to create custom tools, automate tasks, and integrate Maya assets into VR projects. The course covers writing user interfaces with Maya commands and Qt, writing data to disk and loading it back into Maya as JSON, and creating command line tools. The course could be useful to virtual reality developers because you will have full source code access with comprehensive comments to follow along with.
Motion Graphics Artist
A motion graphics artist creates animated visuals for a variety of media, often incorporating text, images, and video. This course may be useful in enabling more sophisticated motion graphics using Python scripting in Maya, automating repetitive tasks, and creating custom animation tools. This course covers Python fundamentals and advanced Python concepts, such as lambda functions, partial functions, and regular expressions. It also covers writing user interfaces with Maya commands and Qt, writing data to disk and loading it back into Maya as JSON, and creating command line tools. These aspects could be useful to a motion graphics artist.

Reading list

We've selected one books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Python For Maya: Artist Friendly Programming.
Provides a comprehensive guide to using Python within Maya for both game development and film production. It covers a wide range of topics, from basic scripting to advanced tool development. It is particularly useful for understanding how to apply Python to solve real-world problems in a production environment. This book valuable resource for anyone looking to take their Maya Python skills to the next level.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser