Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions EXTENDSCRIPT loop in property layer

  • EXTENDSCRIPT loop in property layer

    Posted by Rainier Raydán on May 31, 2017 at 12:21 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);
    }

    Rainier Raydán replied 8 years, 11 months ago 1 Member · 1 Reply
  • 1 Reply
  • Rainier Raydán

    May 31, 2017 at 4:45 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!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy