DigiPen CS115 / CSX510 - Spring 2020

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.

Prerequisites

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.

Week 1

1B: 3D Mosaic - Part 1

Variables, FOR loops, PyMEL nodes, object-oriented syntax, and starting the 3D Mosaic project.

Week 1

2A: 3D Mosaic - Part 2

UV space, color sampling with colorAtPoint, mapping texture data to 3D tile positions.

Week 2

2B: 3D Mosaic - Part 3

Iterating over mesh vertices, creating objects at vertex positions, completing the mosaic project.

Week 2

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.

Jan 21

3B: Height-Map Mosaic

Extend the mosaic with UV sampling, greyscale height mapping, and vertex coloring from image data.

Jan 23

4A: Helix Patterns

Using math.sin() for oscillating values, pivot points, world-space transforms, and defining reusable functions.

Jan 28

4B: Vertices and Spikes

Mesh component iteration, accessing vertex positions, creating objects at vertices, and random scaling.

Jan 30

Part 3 - Mesh Queries and Materials

5A: Mesh Queries

Advanced mesh queries, face normals, selecting faces by direction, and functional programming patterns.

Feb 4

5B: Photo Wall

Creating a wall of textured planes from image files. Materials, file textures, and batch asset creation.

Feb 6

6A: Return Values and Searching

Return values, area calculations, searching nodes by type, and building utility functions.

Feb 11

6B: Rigid Body Simulation

Dynamic rigid body simulation setup, textured falling objects, and physics in Maya.

Feb 13

Part 4 - Object-Oriented Programming

7A: Intro to Classes

List and string slicing, face extrusion on geometry, and introduction to Python classes and OOP.

Feb 18

7B: Advanced Classes

Car racing simulation and player combat game. Class inheritance, methods, and game logic.

Feb 20

8A: PyMEL UI Basics

Building user interfaces with PyMEL commands. File browsers, sliders, buttons, and callbacks.

Feb 25

8B: JSON and UI Building

Loading JSON data in class constructors, building data-driven UIs, and PyMEL window layouts.

Feb 27

Part 5 - Camera Rigs and Tools

9A: Camera Rig Setup

Functions, grouping objects, and building a camera rig class in Maya.

Mar 3

9B: Render Camera Rig

Complete render camera rig system with orbit controls and animation-ready setup.

Mar 5

10A: LOD Creator

Level of Detail creator tool. Reducing polygon counts for game-ready assets.

Mar 10

10B: File Importer

Building a file import tool with batch processing and scene management.

Mar 12

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.

Mar 24

11B: Qt Designer

Building UIs with Qt Designer and loading .ui files in Maya with PySide2.

Mar 26

12A: Qt Template UI

Qt template with button callbacks, signal/slot connections, and reusable UI patterns.

Mar 31

12B: Ring of Fire (Part 1)

Particle FX tool - creating animated ring of fire effects with Maya particles.

Apr 2

Part 7 - Professional Pipeline Tools

13A: Scene Archiver

Scene archiver tool and completing the Ring of Fire FX. File management and packaging.

Apr 7

13B: Archiver and LOD

Completing the scene archiver and starting LOD generation tools.

Apr 9

14A: Mini Exporter

Geometry exporter with collision proxy generation (UCX_ prefix for Unreal Engine).

Apr 14

14B: Edge Reducer

Edge reduction tool for optimizing mesh complexity. Course wrap-up.

Apr 16