Mailing List AE-List@media-motion.tv ? Message #51421
From: mylenium@mylenium.de <mylenium@mylenium.de>
Subject: Re: [AE] Expression
Date: Tue, 5 Nov 2013 04:02:57 +0100 (CET)
To: After Effects Mail List <AE-List@media-motion.tv>
You would have to iterate through all the layers and then use another loop to chekck for keyframes. depending on how they are laid out, you would also need code to check if multiple keys exist at the same time. Could potentially become convoluted...
 
Mylenium
 
[Pour Mylène, ange sur terre]
-----------------------------------------
www.mylenium.de
 
Phil Spitler <phil@bonfirelabs.com> hat am 5. November 2013 um 02:05 geschrieben:

I think my description wasn't clear....
 
I'm actually using it to reset a text layer frame counter to zero on every keyframe of a different layer.
 
Thanks.
 
Phil
 
 
 
 

signature1 Phil Spitler  |  Creative Technologist   |  Bonfire Labs  |  t : 415.394.8200  m : 415.571.3139

Website | Facebook | LinkedIn

On Nov 4, 2013, at 4:41 PM, Zack Lovatt wrote:

Even easier! Apply this to the slider.
 
L = thisComp.layer("Target Layer");
if (L.transform.opacity.numKeys != 0){ 
0; // If the target layer has any keys, set slider to 0.
} else { 
value; // If there are no keys, use the slider value.
}
 
Or, more concise:
 
if (thisComp.layer("Target Layer").transform.opacity.numKeys != 0) 0 else value;

Zack Lovatt
416.786.4129


On 4 November 2013 19:36, Phil Spitler <phil@bonfirelabs.com> wrote:
I'm trying to figure out an expression that will reset a slider to 0 every time there is a keyframe in opacity on a specified layer.
 
I'm guessing it will be some kind of trick where I look at the key(x).time and compare it to the current time.
 
Any ideas?
 
Cheers.
 
Phil
 
Phil Spitler  |  Creative Technologist   |  Bonfire Labs  |  t : 415.394.8200  m : 415.571.3139

Website | Facebook | LinkedIn

 
 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster