Return-Path: Received: from moutng.kundenserver.de ([212.227.126.171] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5274835 for AE-List@media-motion.tv; Tue, 05 Nov 2013 04:01:27 +0100 Received: from oxbsltgw11.schlund.de (oxbsltgw11.schlund.de [172.19.249.28]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MhD7J-1VHieB1BwX-00N0g2; Tue, 05 Nov 2013 04:02:58 +0100 Date: Tue, 5 Nov 2013 04:02:57 +0100 (CET) From: "mylenium@mylenium.de" Reply-To: "mylenium@mylenium.de" To: After Effects Mail List Message-ID: <951059797.973.1383620577633.open-xchange@email.1und1.de> In-Reply-To: References: Subject: Re: [AE] Expression MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_972_1903921242.1383620577574" X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.2.2-Rev26 X-Provags-ID: V02:K0:L36JvUWdc79kcGZAp1xz9jtWE4HZU5jkvamtuoe7EC1 X6iqDI5CRsTKRZQbto/hzqUKv3VKoAehUDHrRm05tEYqNxbQyT CAyfq1FByx/kre9MThFPXQMwqdigg0sn3N9CWgn/WNeqSEgDjs 84oS30v1Yl5xOTqUhedssrpStsd8RdVoHrUV9CAk4jociWa/vJ FxtLWcei3m1t7KCjlFXuRf+V4M8y9EXs9ZVK0BcB6mBaZknCio kTaN4yHmssnJV9sS0asODwRiAr4+xGvKkl3ppdXQtb9kCD0L+8 N1deLCzdA/nPj2gs09LEiKb2S3sS9efoeQYeo+FlqyqLTmsWFO qlYpiPFH7YgMw52XovomWLCNyxWLEP9pGQw8XW2x1KUJFryAVj SSnW070TxLA+5suiz407LTdr5khsz6KbRI= ------=_Part_972_1903921242.1383620577574 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 ne= ed code to check if multiple keys exist at the same time. Could potentially be= come convoluted... Mylenium [Pour Myl=C3=A8ne, ange sur terre] ----------------------------------------- www.mylenium.de > Phil Spitler hat am 5. November 2013 um 02:05 > geschrieben: >=20 > I think my description wasn't clear.... >=20 > I'm actually using it to reset a text layer frame counter to zero on eve= ry > keyframe of a different layer. >=20 > Thanks. >=20 > Phil >=20 >=20 >=20 >=20 >=20 > signature1 Phil Spitler | Creative Technologist | Bonfire Labs | = t : > 415.394.8200 m : 415.571.3139 >=20 > Website | Facebook > | LinkedIn > >=20 > On Nov 4, 2013, at 4:41 PM, Zack Lovatt wrote: >=20 >=20 > > > Even easier! Apply this to the slider. > >=20 > > > > > L =3D thisComp.layer("Target Layer"); > > > if (L.transform.opacity.numKeys !=3D 0){ > > > 0; // If the target layer has any keys, set slider to 0. > > > } else { > > > value; // If there are no keys, use the slider value. > > > } > > > > >=20 > > Or, more concise: > >=20 > > > > > if (thisComp.layer("Target Layer").transform.opacity.numKe= ys !=3D > > > > > 0) 0 else value; > > > > >=20 > > Zack Lovatt > > 416.786.4129 > >=20 > >=20 > > On 4 November 2013 19:36, Phil Spitler > > wrote: > > > > > I'm trying to figure out an expression that will re= set a > > > > > slider to 0 every time there is a keyframe in opacity on a > > > > > specified layer. > > >=20 > > > 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. > > >=20 > > > Any ideas? > > >=20 > > > Cheers. > > >=20 > > > Phil > > >=20 > > > Phil Spitler | Creative Technologist | Bonfire Labs | t= : > > > 415.394.8200 m : 415.571.3139 > > >=20 > > > Website | Facebook > > > | LinkedIn > > > > > > > >=20 > > >=20 ------=_Part_972_1903921242.1383620577574 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
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

 
------=_Part_972_1903921242.1383620577574--