Python Tools
A 28-session course on Python scripting for Maya. From basic PyMEL commands to professional pipeline tools, covering mesh manipulation, procedural generation, OOP, UI development with PySide2/Qt, and studio-ready exporters.
Course Overview
This course was taught at DigiPen Institute of Technology in Spring 2020. It takes students from zero Python/Maya experience to building professional tools. Each session includes detailed notes and working code examples.
Basic familiarity with Maya's interface is helpful but not required. No prior programming experience needed - the course starts from fundamentals.
Sessions
Part 1 - Introduction and First Project
1A: Introduction to Python
Course overview, why scripting matters, Maya's script editor, your first Python code, and coding standards.
1B: 3D Mosaic - Part 1
Variables, FOR loops, PyMEL nodes, object-oriented syntax, and starting the 3D Mosaic project.
2A: 3D Mosaic - Part 2
UV space, color sampling with colorAtPoint, mapping texture data to 3D tile positions.
2B: 3D Mosaic - Part 3
Iterating over mesh vertices, creating objects at vertex positions, completing the mosaic project.
Part 2 - PyMEL Fundamentals
3A: Image-Based Mosaic
Create a 3D mosaic from an image using FOR loops. Introduction to PyMEL, file nodes, and iterative object creation.
3B: Height-Map Mosaic
Extend the mosaic with UV sampling, greyscale height mapping, and vertex coloring from image data.
4A: Helix Patterns
Using math.sin() for oscillating values, pivot points, world-space transforms, and defining reusable functions.
4B: Vertices and Spikes
Mesh component iteration, accessing vertex positions, creating objects at vertices, and random scaling.
Part 3 - Mesh Queries and Materials
5A: Mesh Queries
Advanced mesh queries, face normals, selecting faces by direction, and functional programming patterns.
5B: Photo Wall
Creating a wall of textured planes from image files. Materials, file textures, and batch asset creation.
6A: Return Values and Searching
Return values, area calculations, searching nodes by type, and building utility functions.
6B: Rigid Body Simulation
Dynamic rigid body simulation setup, textured falling objects, and physics in Maya.
Part 4 - Object-Oriented Programming
7A: Intro to Classes
List and string slicing, face extrusion on geometry, and introduction to Python classes and OOP.
7B: Advanced Classes
Car racing simulation and player combat game. Class inheritance, methods, and game logic.
8A: PyMEL UI Basics
Building user interfaces with PyMEL commands. File browsers, sliders, buttons, and callbacks.
8B: JSON and UI Building
Loading JSON data in class constructors, building data-driven UIs, and PyMEL window layouts.
Part 5 - Camera Rigs and Tools
9A: Camera Rig Setup
Functions, grouping objects, and building a camera rig class in Maya.
9B: Render Camera Rig
Complete render camera rig system with orbit controls and animation-ready setup.
10A: LOD Creator
Level of Detail creator tool. Reducing polygon counts for game-ready assets.
10B: File Importer
Building a file import tool with batch processing and scene management.
Part 6 - Qt / PySide2 UI Development
11A: CSV Data Export
Scene data extraction and exporting to CSV. Working with file I/O and structured data.
11B: Qt Designer
Building UIs with Qt Designer and loading .ui files in Maya with PySide2.
12A: Qt Template UI
Qt template with button callbacks, signal/slot connections, and reusable UI patterns.
12B: Ring of Fire (Part 1)
Particle FX tool - creating animated ring of fire effects with Maya particles.
Part 7 - Professional Pipeline Tools
13A: Scene Archiver
Scene archiver tool and completing the Ring of Fire FX. File management and packaging.
13B: Archiver and LOD
Completing the scene archiver and starting LOD generation tools.
14A: Mini Exporter
Geometry exporter with collision proxy generation (UCX_ prefix for Unreal Engine).
14B: Edge Reducer
Edge reduction tool for optimizing mesh complexity. Course wrap-up.