Return-Path: Received: from mail-pd0-f175.google.com ([209.85.192.175] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5274788 for AE-List@media-motion.tv; Tue, 05 Nov 2013 02:04:09 +0100 Received: by mail-pd0-f175.google.com with SMTP id g10so7410064pdj.34 for ; Mon, 04 Nov 2013 17:05:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type:subject:date :in-reply-to:to:references:message-id; bh=7sJX8T6aF/jbvb1BGzNx1u27OtG1r2an410HUzHFbfs=; b=IyDxnb2/kn3weqTz5z+NVS8SLijGDSJfKRar4SkmLxJxx4wJuF54xbcw8jSaAwTkAl RQUzegFA5wUkIWiH3joK0x2TWDE6id3FJFITqyqQHxxsByYfNMycOWiB2vDZRcj6sdi9 6/I0Ag/7jexKhX23TXrVeF7daJAuY/0btsUKYbqWCrnHkFvxfE1IQ6uI8i1QHj52i4cf KmwcBheaXZmqnMeGLZZQ3WhFqqfDLCzCd7ZZzecNJ1UmJGZGhQpEJc+lt8Jo47rsnDgZ WybFmRJP0PJfFO8ddiQQvsRDWVSsZAH8OELNJ9nmfYmm0I6I+TyGNNq6wlPtnXxCdhbR 620Q== X-Gm-Message-State: ALoCoQmerHfYy6nbWQezYlgHCWu6ia8PxqhhEuqiZaLqhE5zJ3MvsGZiLGlvtKvztDGA91FF5etK X-Received: by 10.66.4.130 with SMTP id k2mr20090294pak.95.1383613538361; Mon, 04 Nov 2013 17:05:38 -0800 (PST) Return-Path: Received: from [10.0.0.227] ([65.223.58.66]) by mx.google.com with ESMTPSA id xv2sm30827231pbb.39.2013.11.04.17.05.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Nov 2013 17:05:35 -0800 (PST) From: Phil Spitler Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_07CA922D-0700-4EC7-9E6F-6BBD39C4A912" Subject: Re: [AE] Expression Date: Mon, 4 Nov 2013 17:05:34 -0800 In-Reply-To: To: "After Effects Mail List" References: Message-Id: <1DEB52FC-E510-4699-A50A-C330098C9E77@bonfirelabs.com> X-Mailer: Apple Mail (2.1283) --Apple-Mail=_07CA922D-0700-4EC7-9E6F-6BBD39C4A912 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 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 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. >=20 > L =3D thisComp.layer("Target Layer"); > if (L.transform.opacity.numKeys !=3D 0){=20 > 0; // If the target layer has any keys, set slider to 0. > } else {=20 > value; // If there are no keys, use the slider value. > } >=20 > Or, more concise: >=20 > if (thisComp.layer("Target Layer").transform.opacity.numKeys !=3D 0) 0 = else value; >=20 > Zack Lovatt > 416.786.4129 > www.zacklovatt.com >=20 >=20 > 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. >=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 --Apple-Mail=_07CA922D-0700-4EC7-9E6F-6BBD39C4A912 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1 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



--Apple-Mail=_07CA922D-0700-4EC7-9E6F-6BBD39C4A912--