These compressed archives contain the scripts used in the
book. When a script file is named Chapter<number>.mel, you
should work through the example in the chapter using the .mel file as
reference only.
The other scripts can be executed in full using the Script
Editor's "Source Script..." command, though you may have to work through
certain steps prior to executing the scripts to see what's depicted in
the chapters.
These scripts include all of the corrections made in the errata listed
below.
On the copyright page, opposite the first page of the Contents, a few
lines below the copyright date, you will see a row of numbers. If
the numbers read:
Page 149 (added 8/10/03) In the second line of code at the top of the page,
string $selected_joints[] = `ls
-sl *joint*`;
should read
string $selected_joints[] = `ls -sl "*joint*"`;
Page 152
The section entitled Creating Nodes in a MEL Scene should be
called Creating Nodes in a Maya Scene
Page 156
The document (and help menu item) that was called the DG Node Reference in Version 3 is now
called the Node and Attribute Reference
in Version 4
Chapter 9: Controlling the Flow of Execution
Page 167 (updated for
clarity, 8/29/03)
The first code block (unindented) should read
if
($number < 30) { if ($number < 20) { print ("It's less than 20!\n"); if ($number == 13) { print ("It's 13!\n"); } } else { print ("Hmm, I think it's
between 20 and 30?\n"); } }
and the second should read:
if
($number < 30) { if ($number
< 20) {
print ("It's less than 20!\n");
if ($number == 13)
{
print ("It's 13!\n");
} } else {
print ("Hmm, I think it's between 20 and 30?\n"); } }
Chapter 10: Procedures and Functions
Page 183
Example 2: Geometry-Constrained
Locators initially promises that the locators will be
geometry-constrained and then normal-constrained, but instead uses an
aim constraint in the actual example. The resulting difference is
generally not relevant to the principles presented in the chapter.
Chapter 13: Simple MEL User Interfaces
Page 226
In the script hunt_for_blah, the line
int $found_match = ! `strcmp "blah" $typedString`;
should read
int $found_match = ! `strcmp
"blah" $matches_blah`;
Page 232
The command to run the script is incorrect. Instead of
These lines are correct in the full
listing of the procedure on pg. 264.
Chapter 16: Examples Using MEL with Particle Dynamics
Page
284
The text refers to setting the playback end time to 200 but offers the
MEL command
playbackOptions
-min 1 -max 360;
The text should say "set your playback start time to 1 and your
playback end time to 360" etc.
In the first line of the "Per Particle Arrays" section, the text reads
"Access the Per Particle (Array) Attributes section and click the
General button." It should read "Access the Add Dynamic Attributes
section and click the General button."
Page 293
The comment // Changed to only V should be deleted
Page 304
The message that Maya prints when executing the line beginning
with float $Pstart[] is only this:
Page 389 Not all the new code is correctly marked in boldface.
In particular, everything after
// Add vehicle force field for follower
on page 389 is new code
Page 393
The curly bracket after cycleCheck -e off; should be in
boldface to indicate that it's new code.
Page 405
The line that reads:
string $collectObjects = `ls -sl`;
should read
string $collectObjects[] = `ls -sl`;
Pages 406
The sentence that reads "This command will print out -150, the
value in the 1st row and 3rd column" should read "This command will
print out -150, the value in the 4th row and 1st column."
Page 149 (added 8/10/03) In the second line of code at the top of the page,
string $selected_joints[] = `ls
-sl *joint*`;
should read
string $selected_joints[] = `ls -sl "*joint*"`;
Chapter 9: Controlling the Flow of Execution
Page 167
The first code block (unindented) should read
if ($number < 30)
{
if ($number < 20)
{
print ("It's less than 20!\n");
if ($number == 13)
{
print ("It's 13!\n");
}
}
else {
print ("Hmm, I think it's between 20 and 30?\n");
}
}
and the second should read:
if ($number < 30)
{
if ($number < 20)
{
print ("It's less than 20!\n");
if ($number == 13)
{
print ("It's
13!\n");
}
}
else {
print ("Hmm, I think it's between
20 and 30?\n");
}
}
Chapter 10: Procedures and Functions
Page 183
Example 2: Geometry-Constrained
Locators initially promises that the locators will be
geometry-constrained and then normal-constrained, but instead uses an
aim constraint in the actual example. The resulting difference is
generally not relevant to the principles presented in the chapter.
Chapter 16: Examples Using MEL with Particle Dynamics
Page 312
The fifth line of code that read
float $Pstart = `xform -q -a -translation $planes[0]`;
should read
float $Pstart[] = `xform -q -a -translation
$planes[0]`;
Chapter 18: Example of a Simple Crowd System
Pages 406
The sentence that reads "This command will print out -150, the
value in the 1st row and 3rd column" should read "This command will
print out -150, the value in the 4th row and 1st column."