ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

The right way to precompose a bunch of layers you generate from script?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Bryan Woods
The right way to precompose a bunch of layers you generate from script?
on Oct 11, 2017 at 6:44:06 am

I want to build a visual element to act as a guide. Its composed of a bunch of different native effects and layers. What's the best way to create this guide in script? Do I generate all the layers individually with their effects, then select all of those recently created layers and precompose? Or is there a way to generate and add to a precomp at the same time? What's the proper code for accomplishing something like this, and what is most efficient? Once the precomp is made, i also need to set the precomp's blending mode to screen.


Return to posts index

Andrei Popa
Re: The right way to precompose a bunch of layers you generate from script?
on Oct 11, 2017 at 2:04:40 pm

I personally would create the precomp first and then add all the layers inside it. That way you don't need to worry if you selected the correct layers and such. So steps would be create the precomp and add it to the active composition and set the blending mode
var myPrecomp =app.project.items.addComp(name, width, height, pixelAspect, duration, frameRate) ;
var myPrecompLayer = app.project.activeItem.add(myPrecomp);
myPrecompLayer.blendingMode = BlendingMode.SCREEN ;

Then, inside it add all the layers. Crefull, since here you have to use the composition variable(myPrecomp), not the layer one.
myPrecomp.layers.add() //or maybe addText, addShape or whatever you need
I hope it helped,

Andrei


Return to posts index

Bryan Woods
Re: The right way to precompose a bunch of layers you generate from script?
on Oct 11, 2017 at 3:36:26 pm

Awesome, I'll give this a try. Thanks!


Return to posts index

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