|
|
This would print a new number on each frame from 0 to frame 360:
t = timeToFrames(time); if(t < 360) printf(t);
As Dan already mentioned, an expression can be thought of as a function that is evaluated on every frame. The last value given in the expression is the value that the property will take. Only the last value of your loop will be returned unless you break out of the loop when you've reached the value you're looking for.
-D
On Wed, Mar 7, 2012 at 3:39 PM, Gary Berendsen <gary@garyberendsen.com> wrote:
what i was trying to do to a property is:
for ( x = 0; x < 360; x++ ) { printf( "%d\n", x ); }
but instead of the printf in C this would change the value of the property.
Gary Berendsen - VFX Generalist
@DuintjerCS Kamer 10.09
Vijzelstraat 72
1017 HL Amsterdam
On Mar 8, 2012, at 12:17 AM, Zack Lovatt wrote: Hey Gary! I wrote up a post on this a while back, included an AEP with it at the bottom. Hopefully it's written understandably; if you have any questions, comments and/or concerns don't hesitate to respond or contact me off-list for clarification:
http://zacklovatt.com/2012/02/for-while-loops/Otherwise, it may help if you try to explain what you're looking to accomplish; there may be an alternate method to it.
Zack Lovatt 416.786.4129www.zacklovatt.com
How do you animate a while loop in AE?
When I use it I just get the final return of the expression.
Also another question how do you invert the exponential curve from math.exp so things start slower and go fster at the end?
|
|