Introduction To Python Scripting for Maya Artists PDF (914.6 KiB, 23,853 hits)Last updated: 2/27/2016
This workshop is geared towards students with little to no scripting/programming experience. By the end of this workshop, you will have the knowledge to write and run Python scripts inside and outside of Maya. You will not learn everything about Python from this workshop. This workshop includes all the basic information you should know in order to be proficient in reading, writing, running, and modifying Python scripts. The purpose of this workshop is not to make you expert Python scripters, but to give you a solid foundation from which in further your Python studies.
- Learning Python, 3rd Edition by Mark Lutz
- Dive Into Python: http://www.diveintopython.org/toc/index.html
- The python_inside_maya Google email list: http://groups.google.com/group/python_inside_maya
Python in the Computer Graphics Industry
Some Programs that support Python:
- 3ds max
What is Python used for?
- Automate repetitive and/or tedious tasks.
- Reduce human error.
- Produce more creative iterations in the feedback loop.
- Create applications and tools to run studio pipelines.
- Customize existing applications to support studio specific workflows.
- Let artists be artists.
- Introduction to Python
- Data Types and Variables
- Controlling the Flow of Execution
- Exceptions and Error Handling
- Files and Paths
- Classes and Object Oriented Programming
- Documenting your Code
- Coding Conventions
- Writing Clean Code
- Python in Maya
While I’ve covered most of the basics, there are still many more aspects of Python and programming in general.
- The Beginner’s Guide to Python contains many resources on Python.
- Pluralsight has a great course on Unit Testing with Python.
- Pluralsight has another great course on writing clean code called Clean Code: Writing Code for Humans.
- Clean Code: A Handbook of Agile Software Craftsmanship is a great book on reading clean and easy to read code. While not Python specific (it’s written for Java) it’s concepts still apply.
After reading these notes, you should have a good understanding of how to write and run Python scripts inside and outside of Maya. There is still plenty to learn though. There are hundreds of Maya commands and plenty of useful modules out there to experiment with. I recommend continuing your Python education by looking through the references included with these notes, reading other peoples’ scripts, and experimenting with your own scripts. Good luck!