ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Value increase with active layer.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dust APO
Value increase with active layer.
on Jan 7, 2020 at 8:17:26 pm
Last Edited By Dust APO on Jan 8, 2020 at 4:49:30 pm

Hello, I'm trying to use 'roughen edges' and increase the 'evolution' value for every active layer found in the "clips" comp? AE2020

val = 0;
C = comp("Clips");
for (i = 1; i <= C.numLayers; i++){
L = C.layer(i);
if (L.hasVideo && L.active){
val = 100;
break;
}
}
val


Original Source: https://forums.creativecow.net/thread/227/22064#22071


Return to posts index

Andrei Popa
Re: Value increase with active layer.
on Jan 9, 2020 at 8:04:54 am

This starts at the value that you initially set for the property. Then increases with valuePerLayer each time an active layer is found.


valuePerLayer = 100;
val = value;
C = comp("Clips");
for (i = 1; i <= C.numLayers; i++){
if (C.layer(i).active){
val += valuePerLayer;
}
}
val


Andrei
My Envato portfolio.


Return to posts index

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