'How to create an Adjustment Layer in After Effects via scripting?

I know it's possible to create Shape Layers and Solids via scripting, but how do I create an Adjustment Layer?



Solution 1:[1]

It's pretty simple. Every layer can be turned into an Adjustment Layer. You can simply create a solid layer and then turn it into one like this:

var solid = comp.layers.addSolid([0,0,0], 'LayerName', 1920, 1080, 1, duration);
solid.adjustmentLayer = true

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 JustGoscha