Script Mode¶
Script Mode is MCA Editor's default mode — a lightweight, tab-based script editor designed for quick Maya scripting. Think of it as Maya's Script Editor, but better.
Overview¶
In Script Mode, each tab is an independent script buffer. You can have multiple tabs open, each with its own code and language. Tabs are not tied to files on disk — they're scratch pads for quick experiments.
Creating and Managing Tabs¶
- New tab: Ctrl+N or File > New Tab
- Close tab: Ctrl+W
- Switch tabs: Ctrl+Tab / Ctrl+Shift+Tab or click the tab header
- Drag to reorder: Click and drag tab headers to rearrange
When creating a new tab, you can choose the language (Python or MEL).
Writing Code¶
MCA Editor provides a modern editing experience:
- Syntax highlighting for Python and MEL
- Auto-indentation that follows Python conventions
- Bracket matching — highlights matching
(),[],{} - Bracket auto-close — typing
(automatically inserts) - Line numbers in the left gutter
- Code completion — context-aware suggestions as you type (Ctrl+Space to trigger manually)
Executing Code¶
| Action | Shortcut |
|---|---|
| Execute all | Ctrl+Enter |
| Execute selected text | Ctrl+Shift+Enter |
Execution results appear in the Output Panel below the editor. Python code runs in Maya's Python interpreter, MEL code runs in Maya's MEL interpreter.
Execute selection
Select a portion of your code and press Ctrl+Shift+Enter to run just that selection. Great for testing individual lines or blocks.
Saving and Loading¶
Even in Script Mode, you can save your scripts to disk:
- Save: Ctrl+S
- Save As: Ctrl+Shift+S
- Open file: Ctrl+O
Saved files remember their path — Ctrl+S saves back to the same location.
When to Use Script Mode¶
Script Mode is ideal for:
- Quick one-off scripts
- Testing code snippets
- Running MEL commands
- Interactive Maya exploration
For larger projects with multiple files, see Project Mode.