2010

Table Of Contents
8 Select all objects in the scene and delete them by typing the following
cmds.select(allDagObjects=True)
cmds.delete()
Using the Maya command select with the allDagObjects flag selects
objects that exist physically in the scene such as geometry, IK chains and
measure tools. These appear on an internal Maya representation called
the DAG. For more information, see DAG.
Using the edit flag in Python
When you perform an action on an object in the Maya user interface, youre
using Maya commands to change the attributes of selected objects. You can
use the same Maya commands explicitly to edit the attributes of objects in
the scene.
Some Maya commands take an edit flag that allows you to make changes to
the attributes of an object. The edit flag is used in conjuction with other flags
to specify which attributes to change.
To edit the attributes of an existing object
1 Create a NURBS torus by typing the following:
testVarName=cmds.torus(r=1, axis=(0,1,0) )
Using the edit flag in Python | 711