Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t1 = key(1).time;
- t2 = key(2).time;
- stretch = true;
- toTime = function(){
- low = thisComp.duration;
- nextTime = thisComp.duration;
- prevTime = 0;
- for( i = thisComp.numLayers; i > index; i--)
- if(thisComp.layer(i).inPoint < low && thisComp.layer(i).inPoint > time){
- low = thisComp.layer(i+1).inPoint;
- nextTime = thisComp.layer(i).inPoint;
- prevTime = thisComp.layer(i+1).inPoint;
- break;
- }else{
- prevTime = thisComp.layer(index+1).inPoint
- }
- return [prevTime, nextTime];
- }
- data = toTime();
- if(stretch){
- linear(time, data[0], data[1], t1, t2)
- }else{
- linear(time, data[0], data[0]+(t2-t1), t1, t2)
- }
Add Comment
Please, Sign In to add comment