accumulation
by Adrian Germain
on
Oct 31, 2009 at 5:33:18 pm
I am still trying to figure out how to add the value from looping keyframes to the position of a layer. It's something related to the accumulation expression but i am still not getting the correct result.
Can anyone help?
Thanks.
Re: accumulation by Adrian Germain on Nov 2, 2009 at 1:57:19 pm
Ok. I have 3 keyframes with a loop expression . The value goes from 0(key1) to 100(key2) and it holds till the third keyframe.
what i want is to add this value to position of the null. i mean, each time the loop is beginning it adds the value to the position value at that moment(valueAtTime).So finnaly i will have 0-100, hold, 100-200, hold...and so on.I know expressions don't have memory so that's why i think it's about accumulation.
I was playing with this expression but it is adding each frame value to the previous one so when i have the hold keyframe it will add 100 on each frame.
Hope this time i was more clear.
Thanks.
accum = 0;
f = Math.round(time/thisComp.frameDuration);
for (i = 0; i <= f; i++){
t = i*thisComp.frameDuration;
accum += slider efect.valueAtTime(t);
}