The Script Editor displays a running history of executed commands and the results of commands that Maya executes. You can copy most commands from the history section of the Script Editor and paste them in the input section to execute them.
The Script Editor window opens.
The lower half of the Script Editor is the input section where you enter scripting commands.
By default, Maya displays basic feedback from executed commands. However, when Echo All Commands is on, Maya shows all the history from a command, including when a script calls another script or modifies elements of the user interface. While learning MEL, the extra lines of output produced when Echo All Commands is on can be confusing because there is so much output. As you become more experienced in MEL, the extra lines of history can be useful for debugging a MEL script.
You can more easily isolate the command history created by the commands you perform when there is no other history in the Script Editor.
Command history is displayed in the history section of the Script Editor:
CreateNURBSSphere;
sphere -p 0 0 0 -ax 0 1 0 -ssw 0 -esw 360 -r 1 -d 3 -ut 0 -tol 0.01 -s 8 -nsp 4 -ch 1;objectMoveCommand;
Several MEL commands are executed when the Shelf button is pressed. The following happens when the button is pressed:
Commands in MEL must be separated with semicolons. Additional spaces and additional carriage returns do not affect the execution of the scripts. Blank spaces and returns make scripts easier to read. Flags cannot be separated from the hyphen character by extra spaces or returns.
To type a MEL command in the Script Editor
Script Editor tabs allow you to quickly switch between MEL and Python script entry modes. You can create additional Script Editor tabs to serve as a temporary holding area for scripts.
polyCube;
You must always type on the numeric keypad or + (the regular Enter on your keyboard) to execute commands. Typing regular just creates a new line in the Script Editor input.
A polygonal cube is created at the origin.
The command is removed from the input section of the Script Editor after execution. The command and the result of the command is output to the history section of the Script Editor:
polyCube;
// Result: pCube1 polyCube1 //
Comments in MEL begin with // and anything which follows these characters on a line is ignored by MEL. The same convention is used for displaying results of commands and output in the Script Editor history section. Similarly, results, comments and messages output by Python are prefaced with the Python commenting character ( # ).