addSolid()

app.project.item(index).layers.addSolid(color,name,width,height,pixelAspect,duration)

Description

Creates a new SolidSource object, with values set as specified; sets the new SolidSource as the mainSource value of a new FootageItem object, and adds the FootageItem to the project. Creates a new AVLayer object, sets the new FootageItem as its source, and adds the layer to this collection.

Parameters

color The color of the solid, an array of three floating-point values, [R, G, B], in the range [0.0..1.0].
name A string containing the name of the solid.
width The width of the solid in pixels, an integer in the range [4..30000].
height The height of the solid in pixels, an integer in the range [4..30000].
pixelAspect The pixel aspect ratio of the solid, a floating-point value in the range [0.01..100.0].
duration Optional, the length of a still layer in seconds, a floating-point value.
If supplied, sets the du r at i on value of the new layer. Otherwise, the du r at i on value is set according to user preferences. By default, this is the same as the duration of the containing CompItem. To set another preferred value, choose Edit > Preferences > Import (Windows) or After Effects > Preferences > Import (Mac
OS), and specify options under Still Footage.

Returns

AVLayer object.

Other Tags

Posted in LayerCollection object and tagged , , , , , , , , , , , , , , .