Mailing List AE-List@media-motion.tv ? Message #50700
From: Dan Ebberts <debberts@comcast.net>
Subject: Re: [AE] Expression not working
Date: Fri, 6 Sep 2013 09:53:29 -0700
To: After Effects Mail List <AE-List@media-motion.tv>
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!
 
 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster