Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Python For Maya: Artist Friendly Programming
Rating: 4.4 out of 5(1,770 ratings)
9,381 students

Python For Maya: Artist Friendly Programming

Learn to code with Python to work faster in Maya
Created byDhruv Govil
Last updated 3/2017
English

What you'll learn

  • Develop tools in Python, inside and outside of Maya.
  • Create advanced user interfaces to interact with their tools and manage assets.
  • Have the skills necessary for a studio technical director.

Course content

7 sections77 lectures8h 3m total length
  • Introduction1:20

    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.

  • Overview Of Materials2:37

    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 Editor2:05

    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.

  • Hello World0:55

    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. :)

  • Hello Cube1:07

    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.

    NoteAnother  short lesson, but the next one will be meatier. 

  • The Cube Rig11:42

    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.

  • Variables and Types8:43

    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's Programming Languages and Libraries5:44

    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.

  • Nodes in Maya1:11

    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.

  • The History of Python: 2 vs 32:15

    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.

  • Saving Out Scripts2:00

    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.

  • MEL For Maya0:16

    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.

Requirements

  • You will require a basic knowledge of Autodesk Maya, like creating and manipulating simple objects.
  • You will need a working copy of Maya. Preferably 2017 and above, but 2011 should be the minimum. Links to the trial and educational version will be provided.
  • No programming knowledge is required, but a basic understanding will help.

Description

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


Who this course is for:

  • This course is for artists who want to learn Python programming to make tools, work more efficiently or add job value.
  • The course is targeted to beginners with no programming experience as well as intermediate's who want to learn new skills.