ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

EXTENDSCRIPT loop in property layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Rainier Raydán
EXTENDSCRIPT loop in property layer
on May 31, 2017 at 12:21:22 am

Hi!

I'm trying to do a loop into the property of solids layers to find an effect by it's name (let's suppouse it is Transform effect). How can I write it?

I have this:

var proj = app.project;
var curLayer = proj.item(1).layer(1);

for(var i=1;i<=curLayer.effect.length;i++){
var curEffect = curLayer.effect(i);
alert(curEffect.name);
}


Return to posts index

Rainier Raydán
Re: EXTENDSCRIPT loop in property layer
on May 31, 2017 at 4:45:21 pm

I think I got it!

I did a for loop inside the layer in the effect property like this:

var proj, curItem, fxLength;
proj = app.project;
curItem = proj.item(1);
curLayer = curItem.layer(1);
fxLength = curLayer.effect.numProperties;

for(var i=1;i<=fxLength;i++){
var curFx = curLayer.effect(i);
alert(curFx.name);
}


with this I know my loop works!


Return to posts index

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