store variable

Moderators: Disciple, zlovatt

Post Reply
ghaith
Posts: 13
Joined: October 23rd, 2009, 2:45 am

ok after many bad result trying to solve this i could not get it work

problem is storing the variable in the expression for the next frame my code is simple like this applied on opacity

Code: Select all

if (time <2){
x=10
}
x


on frame 0,1 the x will equal to 10
however on frame 2 their is no x so what to do


note : the code is just testing and simplified i need to store result of calculation and use the result as input or to make it constant
:shock:
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

Expression data does not persist from frame to frame. If you need data from a previous frame, you have to regenerate it. If you can base all your calculations on comp time, then it's pretty easy. Sometimes though, you end up having to recalculate frame-by-frame, starting at time = 0.


Dan
Post Reply