Share
 
 

Script Editor

To open the Script Editor

  • In main menu bar: Windows > General Editors > Script Editor
  • In the viewport: Panels > Panel > Script Editor
  • By clicking at the bottom right corner of Maya.

The Script Editor lets you type in single or multi-line scripts in a MEL or Python tab and see the output in the history pane.

The history (top) pane shows the history of commands and their results.

In the input (bottom) pane, type commands and scripts in the MEL or Python tab.

A MEL or Python icon appears on each tab to denote its language, so you can differentiate between MEL and Python tabs without the need to select them.

Tip:

If you create your own custom tabs, you can add your own icon to the tab instead of using the standard MEL or Python icons. For more information, see the tabLayout command and the tabIcon and tabIconIndex flags.

If you save your script to the shelf, you can do the same for the tab created on the shelf. For more information, see the shelfTabLayout command and the tabIcon and tabIconIndex flags, and Make a shelf button for a script.

To run a script

To execute the script in the input pane, do one of the following:

  • Press the Enter key on the numeric keypad.
  • Select Command > Execute.
  • Select the text you want to execute and press Ctrl + Enter.
    Tip: On Windows, you can change the font size of the text in the top or bottom panes of the Script Editor.

    Select the input or history pane of the Script Editor (click in the window), then hold the Ctrl key and scroll with your middle-mouse wheel.

    The text gets larger or smaller as you scroll.

To create, close, or rename tabs

Do one of the following:

  • Select the option you want from the Tabs menu.

    Note: Previously, these options were available from the Command menu.
  • Right-click a tab and select from the available options.

  • Right-click either the input or history pane, and select the option you want from the marking menu.

  • Use hotkeys. See the Tabs section in Script Editor menus and hotkeys.

  • Middle-click a tab to close it.

Command highlighting

All commands are highlighted as you enter them in the Script Editor.

Was this information helpful?