Working with Behaviors

This section describes how to enable, rename, lock, duplicate, move, and reorganize behaviors in your project. These procedures apply to every type of behavior.

Behaviors Controls in the Layers Tab and Timeline

When you apply a behavior to an object, the behavior appears in three different places—the Layers tab, the Timeline, and the Behaviors tab of the Inspector.

While the Behaviors tab in the Inspector contains all of the editable parameters for a behavior that’s been applied to an object, the Layers tab and Timeline have several controls for each behavior:

  • Activation checkbox: Turns each individual behavior on or off. Behaviors that are turned off have no effect on the object to which they’re applied.
  • Name: Double-click this field to rename the behavior.
  • Lock: Click the lock icon to lock or unlock a behavior. You cannot modify the parameters of a locked behavior.
    Figure. Layers tab showing Behaviors applied to an object, with their own activation and lock controls as well as the enable/disable Behaviors icon.
  • Enable/disable behaviors: A Behaviors icon (a gear) appears to the right of the name of each object with one or more behaviors applied to it. Clicking this icon turns all behaviors applied to that object on and off.
    Figue. Layers tab showing the Behaviors icon disabled state.

    Note: Control-clicking the Behaviors icon opens a shortcut menu that displays all the behaviors that are applied to that object. Choose a behavior from this menu to display it in the Inspector.

    Figure. Shortcut menu listing behaviors applied to an obect.
  • Show/Hide Behaviors button: Located at the bottom of the Layers tab and Timeline, this button lets you show or hide all behaviors. This button neither enables nor disables behaviors that have been applied to objects in your project; it only controls their visibility.
    Figure. Show/Hide Behaviors button in the Layers tab.

Copying, Pasting, and Moving Behaviors

After you have added behaviors to an object, there are a number of ways you can copy and move them among the other items in the Timeline or Layers tab.

Behaviors can be cut, copied, and pasted like any other item in Motion. When you cut or copy a behavior in the Timeline or Layers tab, you also copy the current state of all that behavior’s parameters.

To cut or copy a behavior
  1. Select a behavior.

  2. Do one of the following:

    • Choose Edit > Cut (or press Command-X) to remove the behavior and place it on the Clipboard.

    • Choose Edit > Copy (or press Command-C) to leave the behavior there and copy it to the Clipboard.

To paste a behavior
  1. Select an object onto which you want to Paste the behavior.

  2. Choose Edit > Paste (or press Command-V).

    The cut or copied behavior is applied to the selected object, with all its parameter settings intact.

You can also move a behavior from one object to another in the Layers tab or Timeline layers list by simply dragging it to a new position.

To transfer a behavior from one object to another
  • In the Layers tab or Timeline layers list, drag a behavior from one object and drop it on top of another.

Note: If you move a Parameter behavior to another object, it is applied to the same parameter it affected in the previous object—as long as the corresponding parameter exists. If the parameter does not exist, the parameter assignment (Apply To field) is set to none.

Figure. Layers tab showing a behavior being dragged from one object to another.

You can also duplicate a behavior in place.

To duplicate a behavior
  1. Select the behavior you want to duplicate.

  2. Do one of the following:

    • Choose Edit > Duplicate (or press Command-D).

    • Control-click the behavior you want to duplicate, then choose Duplicate from the shortcut menu.

You can also duplicate a behavior and apply the duplicate to another object in the Layers tab or Timeline layers list.

To drag a duplicate of a behavior to another object
  • Option-drag the behavior to the object to which you want to apply the duplicated behavior.

    The duplicated behavior is applied to the second object, and the original behavior is left in its original location.

When you duplicate an object, you also duplicate all behaviors that have been applied to it. This way, if you’re creating a project with a number of objects that all need to use the same behavior, you can simply apply that behavior to the first instance of that object, and then duplicate that object as many times as necessary.

Applying Multiple Behaviors to an Object

There is no limit to the number of behaviors you can add to an object. When multiple behaviors are applied to a single object, they all work together to create a final animated effect.

Figure. Layers tab showing a list of behaviors applied to a single object.

In general, each behavior applies a value to a specific parameter. The values generated by all behaviors that affect the same parameters are combined to create the end result. For example, if you apply the Throw, Spin, and Gravity behaviors to a single object, the Throw and Gravity behaviors combine to affect the position of the object. The Spin behavior affects the rotation of the object.

Behavior Order of Operations

When combining different behavior types (such as Parameter and Simulation behaviors), or combining behaviors and keyframes, it is important to understand the behaviors’ order of operations. Motion evaluates behaviors and keyframe in the following order:

Keyframes > Simulation behaviors > All other behaviors

Important: The order of operation is always in effect—regardless of the order in which the behaviors are applied or the keyframes are added to a layer or group.

Use the following guidelines for animating layers with multiple behaviors and/or keyframes:

  • When you animate a layer with keyframes and then apply a behavior, the effect of the keyframes is evaluated first.

    For example, if you animate the Rotation parameter of a layer using keyframes and then apply a Rotational Drag (Simulation) behavior to the layer, the Rotational Drag behavior slows the rotation of the layer. Motion is evaluating the keyframed rotation, and then applying the drag (from the Simulation behavior) to the keyframed animation.

  • When you animate a layer with any behavior, and then add keyframes, the effect of the keyframes is evaluated first.

    For example, if you animate a layer so that it rotates in a clockwise direction using the Spin behavior and then keyframe the Rotation parameter so that the layer rotates in a counterclockwise direction, the layer rotates in the counterclockwise direction. Although the keyframes are added to the project after the Spin behavior, Motion evaluates the keyframes first.

  • When you animate a layer with a Simulation behavior and then apply another behavior, the effect of the Simulation behavior is evaluated first.

    For example, if you animate a layer using the Gravity (Simulation) behavior and then apply a Throw (Basic Motion) behavior, the layer moves downward as specified by the Gravity behavior and in the direction specified in the Throw behavior. Motion is applying the value of the Throw behavior to the value of the Gravity behavior, creating the end result.

  • When you animate a layer with a behavior and then apply a Simulation behavior, the Simulation behavior is evaluated before the first behavior (and may have no effect).

    For example, if you animate the Rotation parameter of a layer using the Oscillate (Parameter) behavior and then apply a Rotational Drag (Simulation) behavior to the layer, the layer oscillates, but is not slowed by the Rotational Drag behavior. Motion is evaluating the Simulation behavior (Rotational Drag) before the Parameter behavior (Oscillate), applying the drag to a 0 value. There is no data for the Simulation behavior to affect.

    Note: Although the Spin behavior appears in the Basic Motion category, Spin is treated as a Simulation behavior in Motion’s order of operations.

For information on combining keyframes with behaviors, see Combining Behaviors with Keyframes.

Reordering Behaviors

When you apply a number of behaviors to a single object, they all appear nested beneath that object in the Timeline and Layers tab. You can change the order in which they are applied; however, because behaviors combine according to the order of operations rather than by their order in the Layers tab, reordering is generally useful only as an organizational tool. One notable exception to this is the Stop behavior. It suspends the activity of all behaviors appearing beneath it that affect the same parameter, while not affecting any behaviors above it in the Layers tab.

To reorder a behavior
  1. Drag the behavior you want to reorder up or down in the list of nested behaviors applied to the same object.

    A position indicator shows where the behavior appears when you release the mouse button.

    Figure. Layers tab showing behaviors being reordered.
  2. When the position indicator is in the correct position, release the mouse button.

Note: Motion has a specific order of operations for keyframes and behaviors. For more information, see Behavior Order of Operations.