add_layer


Description:

[ Version ( deprecated = true , deprecated_since = "1.18" ) ]
public bool add_layer (Layer layer)

Warning: add_layer is deprecated since 1.18.

Add a layer to the timeline.

Note:

This method requires you to ensure the layer's priority will be unique to the timeline. Use append_layer and move_layer instead.

If the layer contains Clip-s, then this may trigger the creation of their core track element children for the timeline's tracks, and the placement of the clip's children in the tracks of the timeline using select_tracks_for_object. Some errors may occur if this would break one of the configuration rules of the timeline in one of its tracks. In such cases, some track elements would fail to be added to their tracks, but this method would still return true. As such, it is advised that you only add clips to layers that already part of a timeline. In such situations, add_clip is able to fail if adding the clip would cause such an error.

Parameters:

this

The Timeline

layer

The layer to add

Returns:

true if layer was properly added.