Return-Path: Received: from st11p02mm-asmtp004.mac.com ([17.172.220.239] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 5202299 for AE-List@media-motion.tv; Fri, 06 Sep 2013 19:53:15 +0200 Received: from dpmmbp.turner.com (unknown [157.166.175.129]) by st11p02mm-asmtp004.mac.com (Oracle Communications Messaging Server 7u4-27.07(7.0.4.27.6) 64bit (built Jun 21 2013)) with ESMTPSA id <0MSP0078WU9N3E50@st11p02mm-asmtp004.mac.com> for AE-List@media-motion.tv; Fri, 06 Sep 2013 18:05:47 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794,1.0.431,0.0.0000 definitions=2013-09-06_08:2013-09-06,2013-09-06,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1305240000 definitions=main-1309060112 From: Daniel Monro Content-type: multipart/alternative; boundary="Apple-Mail=_28DEDA42-9CEB-4843-990F-9B371C3932CE" Message-id: <95332CBE-DFF5-49C8-BDB3-CCB650365DDE@mac.com> MIME-version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: [AE] Expression not working Date: Fri, 06 Sep 2013 14:05:46 -0400 References: To: After Effects Mail List In-reply-to: X-Mailer: Apple Mail (2.1508) --Apple-Mail=_28DEDA42-9CEB-4843-990F-9B371C3932CE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 I just posted that as my facebook status. Someone is undoubtedly trying = to figure out what the joke is.... On FridaySep 62013, at 12:53 PM, Dan Ebberts = wrote: > Try changing this line: > =20 > if (n > 0){ > =20 > to this: > =20 > if ((n > 0) && (t < 10)){ > =20 > =20 > =20 > Dan > =20 > From: Martin, Chris (HQP) > Sent: Friday, September 06, 2013 9:46 AM > To: After Effects Mail List > Subject: [AE] Expression not working > =20 > In AE CS6, I get an error message when using this inertial > bounce expression: > =20 > amp =3D .04; > freq =3D 5; > decay =3D 5; > n =3D 0; > if (numKeys > 0){ > n =3D nearestKey(time).index; > if (key(n).time > time){ > n--; > }} > if (n =3D=3D 0){ t =3D 0; > }else{ > t =3D time - key(n).time; > } > if (n > 0){ > v =3D velocityAtTime(key(n).time - thisComp.frameDuration/10); > value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t); > }else{value} > =20 > I am using this on two position keyframes. The funny thing is that I = can > preview/pre render it a few times and it works fine, then the > error message comes up randomly and then the expression is broken. = What's also strange is that I am using the same expression on another = comp in the same project with not problems. Pulling my hair out! > =20 > Any thoughts? Thanks! > =20 --Apple-Mail=_28DEDA42-9CEB-4843-990F-9B371C3932CE Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1 I just posted that as my facebook status. Someone is undoubtedly trying to figure out what the joke is....

On FridaySep 62013, at 12:53 PM, Dan Ebberts <debberts@comcast.net> wrote:

Try changing this line:
 
if (n > 0){
 
to this:
 
if ((n > 0) && (t < 10)){
 
 
 
Dan
 
Sent: Friday, September 06, 2013 9:46 AM
Subject: [AE] Expression not working
 
In AE CS6, I get an error message when using this inertial
bounce expression:
 
amp = .04;
freq = 5;
decay = 5;
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}}
if (n == 0){ t = 0;
}else{
t = time - key(n).time;
}
if (n > 0){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}
 
I am using this on two position keyframes. The funny thing is that I can
preview/pre render it a few times and it works fine, then the
error message comes up randomly and then the expression is broken. What's also strange is that I am using the same expression on another comp in the same project with not problems. Pulling my hair out!
 
Any thoughts? Thanks!
 

--Apple-Mail=_28DEDA42-9CEB-4843-990F-9B371C3932CE--