Using Set Driven Key to link attributes
 
 
 

The following steps link the door’s movement to the ball’s movement using Set Driven Key.

To link the door’s movement to the ball’s movement

  1. Select the door, then select Animate > Set Driven Key > Set.

    The Set Driven Key window appears with the door in the Driven list.

  2. Click translateY in the Driven list.

    This is the attribute to be driven by the ball’s movement.

  3. Select the ball in the scene view.
  4. In the Set Driven Key window, click Load Driver.

    The ball appears in the Driver list.

  5. In the Set Driven Key window, click translateZ in the Driver list.

    This is the attribute that will drive the door’s movement.

    You can set a driven key only after you select an attribute in the Driver list and in the Driven list.

  6. In the Set Driven Key window, click Key.

    This sets a driven key relationship that links the current Translate Z value of the ball to the current Translate Y value of the door. Whenever the ball’s Translate Z is at this position, the door’s Translate Y will be at its current position.

    The Time Slider is not involved in a driven key relationship and displays no red markers for keys.

  7. Move the ball to the door’s position and then move the door above the ball.

    NoteThe objects in these images have materials applied to give them color. Try Lesson 2: Shading surfaces in the Rendering chapter of the Getting Started guide to learn how to apply materials.
  8. In the Set Driven Key window, click Key.

    This sets another driven key that links the current Translate Z value of the ball to the Translate Y value of the door.

  9. Move the ball to the right of the door and then lower the door to its previous position as shown in the following figure.

  10. In the Set Driven Key window, click Key.

    This sets another driven key that links the attributes.

    You’ve set three driven keys that link the attribute values at different positions. Maya interpolates the linked values to generate the values between the keys.

    If you drag the ball toward the door from either side, the door rises smoothly.

    Playing back the animation from the Time Slider doesn’t move the ball or the door. Driven keys link one attribute to another. They don’t link attributes to times in the Time Slider. However, if you were to animate the movement of the ball, the door would move based on the driven key relationship that has been set.