Page 1 of 1

store variable

Posted: March 30th, 2010, 8:22 am
by ghaith
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:

Re: store variable

Posted: March 30th, 2010, 9:01 am
by Dan Ebberts
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