Create 50% grey solid

What type of scripts do you need?

Moderator: byronnash

Post Reply
scribling
Posts: 143
Joined: May 1st, 2005, 1:52 pm

How do I specify the color of the solid in script?

I've got everything else covered except the color.
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

If you mean when adding a new solid:

LayerCollection addSolid() method (page 98 of CS6 scripting guide)
app.project.item(index).layers.addSolid(color, name, width, height, pixelAspect, duration)

color - The color of the solid, an array of three floating-point values, [R, G, B], in the range [0.0..1.0].

To alter an existing solid:

SolidSource object (page 179 of scripting guide)
app.project.item(index).mainSource

SolidSource color attribute
solidSource.color

Description
The color of the solid, expressed as red, green, and blue values.
Type
Array of three floating-point values, [R, G, B], in the range [0.0..1.0]; read/write.
scribling
Posts: 143
Joined: May 1st, 2005, 1:52 pm

Yes! It took a few tries but it got it working. The values that work are (0.5, 0.5, 0.5)

Thank you!
Post Reply