ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Create AVLayer object.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jovche Malakovski
Create AVLayer object.
on Nov 14, 2017 at 11:02:18 am

Hi,

When using the following code:
someComp.layers.addSolid([1,1,1], "someName", 64, 64,1);
Solid layers get added to the composition and a AVLayer objects gets created inside a Solids folder.
My question is, could it be possible to create the solid layer without the composition, without having to add it as a layer to some comp.
I need this because Im generating compositions with a script and on every comp a solid layers gets created while I only need one solid.


Return to posts index

Dan Ebberts
Re: Create AVLayer object.
on Nov 14, 2017 at 2:17:29 pm

I don't think you can do that directly, but you could do something like this:

var solidLayerSource = null;

Then, inside the loop that creates the comps you could do something like this:


if (solidLayerSource == null){
var solidLayer = someComp.layers.addSolid([1,1,1], "someName", 64, 64,1);
solidLayerSource = solidLayer.source;
}else{
someComp.layers.add(solidLayerSource);
}


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]