ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Find the current copy index inside a repeater

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Juan Irache
Find the current copy index inside a repeater
on Mar 10, 2020 at 12:02:28 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/


Return to posts index

Alex Printz
Re: Find the current copy index inside a repeater
on Mar 11, 2020 at 1:41:19 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


Return to posts index

Alex Printz
Re: Find the current copy index inside a repeater
on Mar 11, 2020 at 1:43:10 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


Return to posts index

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