Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions getting index number for effects on a layer

  • getting index number for effects on a layer

    Posted by Ken Ackerman on January 12, 2012 at 6:11 pm

    Hello,

    I have lots of Circle effects applied to an adjustment layer. I want to write an expression that I can apply to each circle, that will look at it’s radius and change it’s opacity based on that. Is there an expression that I can use to say “look at THIS effect’s radius”?

    Here is what I have so far:

    x = effect(“Circle” + ” ” + (index + 1))(“Radius”);
    if (x == 0){
    0;
    }else{
    100;
    }

    This is taking the index of the layer, not of the expressions on that layer, so it is not doing what I want. Any one have any thoughts about this? Thank you so much!

    x = effect("Circle" + " " + (index + 1))("Radius");
    if (x == 0){
    0;
    }else{
    100;
    }

    Ken Ackerman replied 14 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 12, 2012 at 6:34 pm

    Something like this, I think:

    pg = thisProperty.propertyGroup(1);
    r = pg(“Radius”);
    if (r == 0) 0 else 100

    Dan

  • Ken Ackerman

    January 12, 2012 at 6:41 pm

    Yes. Worked like a charm. Thanks Dan, this is not the first time you’ve saved my hide!

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