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.
- Select Windows > Settings/Preferences > Hotkey Editor.
- Click the Runtime Command Editor tab at the upper right side of the Hotkey Editor.
- Click New.
- Type a Name and Description for the new command.
- Select whether the script is Python or MEL by selecting the correct option.
- In the text field, type the script commands you want the runtime command to execute.
- 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.
- Click the Runtime Command Editor tab at the upper right side of the Hotkey Editor.
- 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.
- Click Edit in the Runtime Command Editor.
- Edit your script and click Save Runtime Command.