Expose Transform HelperWith the new Expose Transform helper, you can now immediately expose the position, rotation, and scale values of a child object in relationship to its parent. This has important implications for the scripting of custom rigging tools and procedural animation. For example, information on how the rotation of the forearm relates to the upper arm can now be delivered to a script or wired to drive animation of the character's shoulder, without the need to jump through hoops to gather the necessary rotational, positional, and scalar valuesthey are all immediately available through the Expose Transform helper.To use the Expose Transform helper, first pick a child node; Expose Transform then automatically relates the child node to its parent node. If you uncheck the Parent button, you can choose any other object in the scene and retrieve values for its relationship to the original child node.Each exposed parameter has an M button next to it; click it to copy the correct transform name to the Windows clipboard. For example, if you press the M button to the right of the Z value for Local Euler Angles, then the string $ExposeTransform01.localEulerZ will be stored in the Windows clipboard. Type Control-V to paste this value into any active Windows text application or the MAXScript editor (Figure 4.1). In this example, the Pin Stack button is used so that transformations to bone 3 allows us to see the resulting changes to Bone 2 in the Expose Transform helper object. Even though Bone 3 is selected, the pinned modifier stack displays the parameters of the Expose Transform Helper. Using the Expose Transform helper. Bone02 can be seen to be a child of Bone01 with an angular relationship to it. The M button is used to copy the appropriate MAXScript name to the windows clipboard. That name can then be pasted into a MAXScript document, where it might be useful. Figure 4.1. Using the Expose Transform Helper. Bone02 is a child of Bone01 and has an angular relationship to it.[View full size image] ![]() Using Expose TransformTo see how the Expose Transform helper works, we'll show how to use transform data to drive an animation. The scene in the following tutorial contains three objects: a plane, a box, and a cylinder. We'll expose the distance between the plane and the box and use this value to drive an animation of the cylinder. The further the box is from the plane, the more the cylinder will bend.
No matter which direction the box moves or the plane moves, the further they are from one another, the more the cylinder will bend. Open the file labeled expose transform finish.max to see the results. ![]() |