2009

Table Of Contents
When a command is not provided with enough command arguments,
the command uses the default arguments. The polygonal cube X scale is
set to three, but the Y and Z scale values are set to their default argument
one.
4 Delete the selected polygonal cube.
cmds.delete()
Using flags in Python
Flags are used with commands to modify their execution. Python implements
flags as named arguments. Some flags in MEL do not require values. As all
named arguments in Python require a value, these flags are given the value
True to enable the flag, or False to ignore the flag. When setting multiple
named arguments, argument-value pairs are separated by commas within the
brackets. Command arguments must appear before named arguments in a
command.
To use flags in Python
1 Create a polygonal cube with the width defined at creation time by typing
the following:
cmds.polyCube(width=5)
648 | Chapter 13 Scripting in Maya