Return-Path: Received: from mail-la0-f52.google.com ([209.85.215.52] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5274771 for AE-List@media-motion.tv; Tue, 05 Nov 2013 01:40:52 +0100 Received: by mail-la0-f52.google.com with SMTP id ev20so4217689lab.39 for ; Mon, 04 Nov 2013 16:42:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=xGRsg8ewKCwzly0UuU3o1gFYEBcwfZshOocaNeByJrU=; b=hA+navCgptQ2UPIusR3J35O3MAbLIfOPxldEU+2qPIM3uvO8wfJckrL+WMCq5Be3sb orMyVRbTlaNlWjQ8xbylznFGcD+3lfkAwfd/twE+awHNNXTKGclU/zPYBH5U2aZ2BESh NntdQIdBIRDJmhR9sDIGtH8AYdj0gfOGFw7oINzvx8zIKW7+uNchshY5DpU42U2SV23Y H/PUsDs7cick2u9KB8bkwf4IAJPUVQa86nv+1kuvsiHuLVVu8bfzpNY0K6AbPxsRzgrQ gaUx9vwPsxpT7aN7br5wKdUdfPvV/8ysFovm2kqElzAwGRBZ5a077YzWE81waEsTXjQN jEhA== X-Gm-Message-State: ALoCoQmDGATKssuh4g5vAakkyi8MvJ2v3xPFxNc/L6qtB7hs1gWT4XBQSBgGbRGB4Bf+Kzf4wzi7 X-Received: by 10.112.132.70 with SMTP id os6mr112297lbb.38.1383612144004; Mon, 04 Nov 2013 16:42:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.176.137 with HTTP; Mon, 4 Nov 2013 16:41:42 -0800 (PST) X-Originating-IP: [192.0.160.155] In-Reply-To: References: From: Zack Lovatt Date: Mon, 4 Nov 2013 19:41:42 -0500 Message-ID: Subject: Re: [AE] Expression To: After Effects Mail List Content-Type: multipart/alternative; boundary=047d7b3a836a59c0f504ea634e9a --047d7b3a836a59c0f504ea634e9a Content-Type: text/plain; charset=ISO-8859-1 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 www.zacklovatt.com On 4 November 2013 19:36, Phil Spitler 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 > > --047d7b3a836a59c0f504ea634e9a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Even easier! Apply this to the slider.

=
L =3D thisComp.layer("Target Layer");
if (L.transform.opacity.= numKeys !=3D 0){=A0
0= ; // If the target layer has any keys, set slider to 0.
} else {=A0
<= span class=3D"" style=3D"white-space:pre"> value; // If there are no= keys, use the slider value.
}

Or, more concise:

if (thisComp.layer("Target Layer").transform.opacity.numKeys !=3D= 0) 0 else value;

Zack Lovatt
416.786.41= 29


On 4 November 2013 19:36, Phil Spitler <= span dir=3D"ltr"><phil@bonfirelabs.com> wrote:
I'm trying to figure out an express= ion 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.
<= br>
Phil

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

Website | Facebook | <= a href=3D"http://www.linkedin.com/company/235257?trk=3Dtyah" target=3D"_bla= nk">LinkedIn


--047d7b3a836a59c0f504ea634e9a--