Datasheet

46
|
CHAPTER 1 Working in Autodesk MAyA
In the Outliner, you’ll see the vehicleReference_v01:vehicle node as well as the vehicleRef-
erence_v01:front_wheels and carPaint container nodes. The container node is an asset
with both the wheelTilt and steer attributes created in the previous section.
Referencing Maya Scenes
You don’t need to do anything special to the scene you want to reference; it can be a standard Maya
scene. When you reference a file in a scene, all of its associated nodes appear using the referenced
file’s scene name as a prefix. You can change this to a custom string using the options in the Create
Reference tool.
5. In the Outliner, select the carAnimation locator, and then Ctrl+click the vehicleReference_
v01:vehicle node.
6. Switch to the Animation menu set, and choose Constrain Parent Options.
7. In the options for the Parent constraint, turn off Maintain Offset, make sure both
Translate All and Rotate All are selected, and set the weight to 1.
8. Click Add to make the constraint. The car is now constrained to the locator and will zip
along the curve in the center of the street.
9. Try setting keyframes on the wheelTilt and steer attributes of the vehicleReference_
v01:front_wheels node.
10. Save the scene to your local scenes directory as street_v02.ma.
11. Open the vehicleReference_v01.ma scene from the directory where you copied this file
on your local drive.
12. Expand the vehicle group and the chassis subgroup.
13. Select the body subgroup. Set its Scale Y attribute to 0.73 and its Scale Z attribute to 1.5.
The Scale Y attribute is the second scale field in the Attribute Editor; the Scale Z attribute
is the third scale field.
14. Open the Hypershade (Window Rendering Editors Hypershade), and select the blue-
Paint material.
15. In the Attribute Editor for the bluePaint material, click the blue color swatch next to the
color channel, and use the Color History to change the color to red.
16. Save the scene using the same name (vehicleReference_v01.ma).
17. Open the street_v02.ma scene. The car model has all the changes you created in the
vehicleReference_v01.ma scene. It is red, and the body is much wider (see Figure 1.46).
Play the animation or scrub on the Time slider to see this.
919774c01.indd 46 6/17/11 9:30:21 PM