Datasheet

14
Chapter 1 Customization and MEL Scripting
It’s possible to adapt the MEL script of a tube brush, although it’s a bit more tricky. As an
example, the first line of the
willow.mel brush, found in the trees brush folder, looks like this:
brushPresetSetup();bPset “time” 1;
bPset “globalScale” 0.3186736972;
bPset “depth” 1; bPset “modifyDepth” 1;...
This is only a small portion of the first line. If printed out in full, it would fill an entire
page. Fortunately, you can decipher it. Each item in quotes, such as
“depth”, is an attribute.
The number after the attribute is the attribute setting. Each attribute corresponds with an
attribute in the Paint Effects Attribute Editor tab. For example,
“depth” corresponds to the
Depth check box in the Channels section. Digging deeper,
“color1G corresponds to the Color G
channel of the Color1 attribute in the Shading section. The following number, 0.6470588446,
is the color value written for the 0-to-1 color range. As a third example,
“flowers corre-
sponds to the Flowers check box in the Growth section. A 0 after
“flowers signifies that
Flowers is unchecked.
Obviously, you would not want to write a tube brush from scratch. However, it’s fairly
easy to copy an existing brush and adapt it. If you’re not sure what each attribute does, a
detailed list can be found in the “brush node” Maya help file.
a
Creating Notes for Your Fellow Animators
Communication is important to professional animators, so there are a number of techniques
available for making notes within Maya.
Every single node that can be loaded in the Attribute Editor has a Notes section. Any-
thing you type into these sections is saved with the Maya scene file. On occasion, Maya uses
these areas to add documentation notes that have
not been included in the regular Maya help files.
For example, the Make Motor Boats tool adds such
a note.
You can create a 3D note by selecting an object,
choosing Create
Annotation, and entering text
into the Annotate Node window. The text appears
in all the workspace views with an arrow pointing
to the object’s pivot point.
The Notes area for the Make Motor
Boats tool
07405c01.indd 1407405c01.indd 14 1/17/07 8:30:53 PM1/17/07 8:30:53 PM