Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all articles
Browse latest Browse all 47983

Time remap to change opacity

$
0
0

Hello,

I have 25 layers in which i would like to switch between their opacities by means of a time remap marker of sorts..
My idea was to create a comp of all my layers 1-25 (All_Layers), then pre comp this into a Time Remap comp (Final_Comp) to enable their opacities via time remap.
ie: if in the time remap comp (Final_Comp) and type in a value of 1 this would change layer 1 of (All_Layers) comp value to 100%, If i key in frame 4, this would change the value of layer 4 to 100%.
All layers would be 0% until keyed into the time remap value.


I received this expression on another forum compliments of Dan Ebberts,.. Thanks! ( strangely i'm unable to log back into that account to respond.. and no one there to assist me!)

L = comp("Final_Comp").layer("All_Layers");
if (Math.round(L.timeRemap) == index) 100 else 0



Either way, this expression doesn't quite work..

When i copy this into the layers opacity channel.  it indeed sets an initial value of 0%, but the time remap values in my (Final_Comp) do not trigger the appropriate layer opacity change.... they remain 0%.

Any ideas?

Thanks for any help

Jeff


Viewing all articles
Browse latest Browse all 47983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>