And I’ve found a few minutes ago this expression that almost perfectly does what I want :
//On the time remap property
L = thisLayer;
t = time;
animLength = 10;
animLength *= thisComp.frameDuration;
LDur = L.outPoint-L.inPoint;
MidDur = LDur - animLength*2;
if( t>=L.inPoint && t<= L.inPoint+animLength) {t-L.inPoint}
else if( t>L.inPoint+animLength && t<L.outPoint-animLength) {animLength + (t-L.inPoint+animLength)/MidDur)*(L.source.duration-animLength*2)}
else if(t>=L.outPoint-animLength && t<=L.outPoint) {t-(L.outPoint-animLength)}
else 0;
It plays the first 10 frames of the animation at the layer’s inpoint, then stretches the in-between frames, and plays the last part of the animation 10 frames before the layer’s outpoint.
I can use this expression, but I would like to know if it could be improved in order to freeze the animation in the middle.
Thanks !