Mailing List AE-List@media-motion.tv ? Message #51423
From: Phil Spitler <phil@bonfirelabs.com>
Subject: Re: [AE] Expression
Date: Mon, 4 Nov 2013 19:09:31 -0800
To: After Effects Mail List <AE-List@media-motion.tv>, mylenium@mylenium.de <mylenium@mylenium.de>
Nope, just one layer that has keyframes and the counter on the 2nd layer so I wouldn't need to loop through each layer.

Phil

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

Website | Facebook | LinkedIn

On Nov 4, 2013, at 7:02 PM, mylenium@mylenium.de wrote:

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