hi everyone!
i was doing some keyframe positioning the other day and found that it could be VERY tedious to do by hand. I had about 50 layers and had to make them fade in, one by one, and offset each layer by one or two frames each. So i had to select all layers, offset them one frame, deselect one layer, offset again and so on and on and on…
Certainly this can be done with expressions, but i don’t know how to do it, i’m kind of new to using expressions.
I start a project to test this, typed “value=time*300” and now i have a layer fadind in 10 frames. Now i need to make all the other layers fade in 10 frames as well, but each frame should start to fade 1 frame after the one before it (maybe it sounds confusing by the way i wrote my explanation…).
Anyone has any idea how i can make this?
'Offsetting' keyframes with expressions
What would you do with an opacity of 300% after one second? In your given example, you reach 100% at 0.3333 secs, which just incidentally translates to 10 frames in a 30fps comp, but will yield different frame counts at other frame rates. your code doesn’t make sense. Proper code would look like this:
fFade=10; //number of frames for fade
fTime=framesToTime(fFade); //frames converted to time
linear(time,inPoint,inPoint+fTime,0,100)
For you other problem the above solution would work perfectly, if you stagger your layers with the Sequence Layers keyframe assistant. If you wanna do it all in code without adjusting the layers’ in-points, some modification will be required:
fStart=index; //index used as offset frames
fTimeS=framesToTime(index); //convert index to time
fFade=10; //number of frames for fade
fTimeF=framesToTime(fFade); //frames converted to time
linear(time,fTimeS,fTimeS+fTimeF,0,100)
Mylenium
Thanks, Mylenium! That worked perfectly!
I know very little about expressions. Normally i can make everything i need without them, but making this manually was taking too much time. Now this will be a life saver!
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.