Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Find the current copy index inside a repeater

  • Find the current copy index inside a repeater

    Posted by Juan Irache on March 10, 2020 at 12:02 pm

    Hello,

    I believe I’ve been able to do this in the past, but I can’t figure out how. I am trying to slightly modify the behaviour (transform) of a repeater based on the index of each copy. For example one in every 10 copies should be larger. Is there a way to find the index of the current repeater copy in an expression?

    Thanks.


    Former video guy. Current code guy
    https://prototyping.barcelona/

    Alex Printz replied 6 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Alex Printz

    March 11, 2020 at 1:41 pm

    No there is no way to differentiate items inside repeaters.

    What you might have been doing is duplicating the contents, transforming them based on their propertyIndex, and every 10th modifying it.

    Should look something like this (expression being applied to the position)

    shape layer > contents > “all assets” group > “asset 1” group > transform > position

    i = thisProperty.propertyGroup(2).propertyIndex; //get the group index of this asset group inside the all assets group
    v = value //value of property
    if( i%10 === 0){ //modify the position based on if the index is equally divisible by 10
    p = value + (value*.1 * i) + [0,-100]; modify position one way;
    } else{
    p = value + (value*.1 * i) + [0,-100]; modify position another way;
    }
    p //final call

    Alex Printz
    Mograph Designer

  • Alex Printz

    March 11, 2020 at 1:43 pm

    Whoops, the else statment was supposed to be different, not the exact same thing than the divisible by 10 if statement

    p = value + (value*.1 * i); modify position another way;

    Alex Printz
    Mograph Designer

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