Create a runtime command

You can create runtime commands for any of your custom scripts using the runtime command editor.

A runtime command is a command that is comprised of other commands and or scripts, for example MEL commands, Maya commands, MEL procedures. Think of a runtime command as a "one-word wrapper" or alias that lets you execute long scripts (or set of scripts) on the MEL command line with a short label. Many (but not all) menu items and icons that are executable use a runtime command to launch.

Runtime commands that you create appear in the Custom Scripts category of the Hotkey Lister. This makes it easy to assign a hotkey to any runtime commands you create .

For information on assigning a hotkey to a command, see Assign a hotkey to a command.

  1. Select Windows > Settings/Preferences > Hotkey Editor.
  2. Click the Runtime Command Editor tab at the upper right side of the Hotkey Editor.
  3. Click New.
  4. Type a Name and Description for the new command.
  5. Select whether the script is Python or MEL by selecting the correct option.
  6. In the text field, type the script commands you want the runtime command to execute.
  7. Click Save Runtime Command. Your new runtime command is saved and listed within the Custom Scripts category of the Hotkey Lister. If you want, assign a hotkey to your new runtime command. See Assign a hotkey to a command.

Edit a runtime command

You can alter or edit runtime commands using the runtime command editor located in the Hotkey Editor.
Note: You cannot modify any Maya default runtime commands.
  1. Click the Runtime Command Editor tab at the upper right side of the Hotkey Editor.
  2. Select the runtime command under the Custom Scripts category of the Hotkey Lister, and then click Edit in the Runtime Command Editor.

    The script appears in the runtime command text field.

  3. Click Edit in the Runtime Command Editor.
  4. Edit your script and click Save Runtime Command.

Related topics