FORUMS: list search recent posts

Changing composition properties from preComposed layers in scipt

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Fred van Rooijen
Changing composition properties from preComposed layers in scipt
on Nov 8, 2011 at 10:51:24 am

Hi,

Just stated doing some scripting in After Effects CS5. It's hard to find good information on the internet about this subject..
In my current script I'm duplicating some layers, adding effects and changed some properties. That seems to work ok. Next I precompose some layers in a new composition. so far so good. But now I want to change it's properties which fails however..

the composition is created but the property line generates a runtime error..:
var newComp= myComp.layers.precompose( layersArr, "Precompop Whites", true );
newComp.blendingMode= BlendingMode.OVERLAY;
newComp.property( "Transform")( "opacity").setValue( 20 ) ;

Any idea orand advice how to troubleshoot this type of errors?

another minor question is how to run the script to a breakpoint using the "extendScript"editor. I can step using F11 but the "Break"option is greyed out and "Run" ignores my breakpoints!

regards
Fred


Return to posts index

Dan Ebberts
Re: Changing composition properties from preComposed layers in scipt
on Nov 8, 2011 at 5:58:47 pm

precompose() returnss a comp. You need to get the layer in the old comp with the new comp name if you want to change the new comp-layer's attributes:

var myNewLayer = myComp.layer("Precompop Whites");

Dan



Return to posts index

Fred van Rooijen
Re: Changing composition properties from preComposed layers in scipt
on Nov 8, 2011 at 7:28:45 pm

Da, That's it Thanks a lot. Any idea where I can find a document which I can use as a reference for this type of "issues"..?

Fred


Return to posts index


Dan Ebberts
Re: Changing composition properties from preComposed layers in scipt
on Nov 8, 2011 at 8:01:51 pm

Just the AE Scripting Guide. There's a link to the latest version (CS3) here, as well as link to the changes since CS3:

http://www.adobe.com/devnet/aftereffects.html

Dan



Return to posts index

Fred van Rooijen
Re: Changing composition properties from preComposed layers in scipt
on Nov 8, 2011 at 8:58:53 pm

It's a pretty limited reference however at a first glance. In the objectmodel it's not clear (for me..) that a composition has it's own layer containing the composition properties.

thanks again however :)

fred


Return to posts index

Dan Ebberts
Re: Changing composition properties from preComposed layers in scipt
on Nov 9, 2011 at 12:04:01 am

>...it's not clear (for me..) that a composition has it's own layer containing the composition properties.

It doesn't, unless you have used it as a layer somewhere. You do that by adding a comp as a layer to another comp, or precomposing one or more layers into a new comp.

It does take a while to get used to the Scripting Guide, but I find it to be an excellent resource and refer to it all the time. The more you use it, the more you understand why it is organized the way it is.

Dan



Return to posts index

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