2009

Table Of Contents
duplicate;
move -r 0 $Y_offset ($diameter_barrel/2.0);
3 Using the Lasso tool, select the extra barrels.
4 Delete the extra barrels to obtain a pyramid shape.
Creating dynamics with MEL commands
Maya lets you easily add dynamic properties to the objects in your scenes. All
attributes that can be modified by selecting menu items, can be accessed by
setting the arguments of a Maya command.
In this section you create a dynamic simulation using MEL so that the stack
of barrels reacts to gravity and moves in a realistic manner. Apply a rigidBody
node to all of the barrels, add a gravity field and a passive rigid body plane
for the barrels to collide with.
For more information about rigid bodies and fields within dynamics in Maya,
see
Lesson 2: Rigid bodies and constraints on page 494 and the Dynamics guide
in the Maya Help.
To add rigid body nodes to the barrels using MEL
1 Select all the barrels by typing the following:
select -allDagObjects;
Creating dynamics with MEL commands | 621