Precompose layers

Precomposing layers places them in a new composition (sometimes called a precomposition), which replaces the layers in the original composition. Precomposing a single layer is useful for adding transform properties to a layer and influencing the order in which elements of a composition are rendered.

  1. Select the layers in the Timeline panel, and choose Layer > Pre-compose or press Ctrl+Shift+C (Windows) or Command+Shift+C (Mac OS).
  2. Select one of the following:
    Leave All Attributes In
    Leaves the properties and keyframes of the precomposed layer in the original composition, applied to the new layer that represents the precomposition. The frame size of the new composition is the same as the size of the selected layer. This option is not available when you select more than one layer, a text layer, or a shape layer.

    Move All Attributes Into The New Composition
    Moves the properties and keyframes of the precomposed layers one level further from the root composition in the composition hierarchy. When you use this option, changes you applied to the properties of the layers remain with the individual layers within the precomposition. The frame size of the new composition is the same as the frame size of the original composition.

Jeff Almasol provides a script on his redefinery website that precomposes selected layers to the duration of the selected layers, with options for head and tail durations for more editing flexibility.