Structure of a MEL Command
A MEL command consists of a command's name, a series of flags, which generally communicate how the command is to be carried out, and usually one or more arguments, which are frequently, though not always, the names of nodes or attributes on which the command should operate. Once again, we'll use the sphere command as an example.
Sphere -radius 10.0 -sweep 180
Figure 7.1 MEL Commands Maya Reference" href="/reference-2/mel-commands.html">MEL Command Reference.
Figure 7.1 MEL Command Reference.
In this example, sphere is the command name, -radius 10.0 is a flag to indicate the sphere's radius, and - sweep 180 is a flag to indicate that we only want to create half a sphere.
Many MEL commands can be run in one of three ways, in create mode, in query mode, and in edit mode. Create mode is selected with a -c flag or with no flag at all, query mode with a -q flag, and edit mode with a -e flag. When none of these flags are used, the command usually defaults to create mode.
Post a comment