Find sub-compositions and widgets

This example explains how to get composition's sub-compositions and widgets.

Functions covered

  • find()

  • findWidget()

Load this example compositionarrow-up-right to follow along in a real composition.

Composition structure

The example composition has one sub-composition called Lower, as you can see in the composition tree.

Select the Lower sub-composition and Control Properties in the property panel to see the sub-composition's objects.

The Lower sub-composition

To go deeper and open the sub-composition's widgets:

  • Double-click the Lower sub-composition.

This sub-composition contains three widgets.

  • lowerTitle: a text widget

  • lowerSubtitle: a text widget

  • lowerLogo: an image widget

The sub-composition's widgets

Composition scripts

To get the same information using composition scripts, open the composition script editor within the same example compositionarrow-up-right as above.

Then, read the comments in the root and Lower composition scripts to see the composition scripts needed to find sub-compositions and widgets.

You can also copy and paste the composition scripts below into your own compositions.

Last updated