← Learn library

Maya & Python Scripting / Maya / Python

Day 1 - Maya Scripting Interface | Maya 30 Day Introduction to Python

Channel: TD Superheroes ·

Legacy TutorialWritten guide

This tutorial is part of the CGI Nerd archive. Some software features, interfaces, or workflows may have changed since it was recorded.

Original TD Superheroes video thumbnail
Day 1 - Maya Scripting Interface | Maya 30 Day Introduction to PythonTD Superheroes · Video hosted on YouTube

Playing loads YouTube content. YouTube processes data after activation.

Watch on YouTube

If the player is blocked or unavailable, use Watch on YouTube.

Software: Maya, Python

Before writing a Maya tool, it helps to know where code is entered, where its result appears, and how to find the command behind a familiar interface action. This first lesson introduces those three tasks through the Script Editor and a small print example.

The recording requires Maya but no special scene or downloaded script. It does not establish an exact application version. Treat the demonstrated interface as historical; the article explains its use without asserting that every later version places the controls identically.

Open a Python input area

The instructor opens Windows → General Editors → Script Editor. His editor already has Python tabs. If a Python tab is missing, he uses the plus control and chooses Python from the available language choices.

The distinction between Python and MEL matters before anything is executed. The lower area is where he types code, while the upper history area shows commands and results. Creating a sphere through the interface produces a command in that history. In this recording, the echoed command is MEL; it provides a name to investigate, rather than Python text to paste unchanged.

The history therefore serves two purposes: observing what an interface action called and checking what happened when your own code ran. Keep the input and history visible together while learning so the relationship remains easy to inspect.

Control what information you see

The instructor demonstrates separate clearing controls for the history, input and both areas. He also switches between history-only, input-only and combined views. These are display and editing actions; clearing the text shown in the editor is not presented as deleting scene objects.

He discusses Echo All Commands as a way to expose more of Maya’s activity. The extra detail can help when investigating an action, but the resulting history can become noisy. Start with the visible action you want to understand, and inspect its result before enabling more output indiscriminately.

Line numbers are another aid when navigating code and locating an error. The lesson also points out search and go-to-line controls. Their role is orientation: they do not change what the script does.

Run a print and keep the code available

The instructor uses a Hello World print example to compare execution controls. He observes that one execution method clears the input after running it, then brings the text back with undo. Selecting the code before pressing Enter on the numeric keypad runs the selection while leaving it available in his demonstration. He also compares Execute All with Execute.

For a first exercise, judge success in the history: did the intended words appear as output? Then inspect the input area separately: is the code still there for editing or another run? These are different outcomes. Text disappearing from the input does not mean the command failed if its output is already visible above.

The recording changes text size with Ctrl and middle-mouse scrolling so the code is easier to read. That presentation choice does not affect execution. The exact print punctuation is not supplied reliably by the captions, so this article does not claim to reproduce the source code character for character.

Use the command reference to move beyond the interface

The last part opens the Python Command Reference, searches for the polygon-sphere command, and examines its description, flags and example. The instructor copies an example into the editor to show how documentation can become an experiment.

This creates a repeatable learning path: perform a familiar operation, identify its command in the history, then read the Python version’s documentation. Inspect what the example creates or returns rather than assuming the echoed MEL syntax translates directly.

The next lesson, Maya Command Module, develops the import alias, arguments and command lookup in more detail.

Useful return points

Caption-supported ranges are 00:00–01:01 for the editor and Python tab, 01:01–03:00 for history and display controls, 03:00–06:02 for execution and retained input, and 06:02 onward for the command reference. They are reading references, not official chapters.

The lesson’s result is a working orientation to scripting, not a completed Maya tool. You should be able to distinguish input from output, repeat a small command without confusing editor behavior with scene behavior, and find the documented Python operation behind a UI action. No current-version or independent software reproduction is claimed.