Inspiring
April 6, 2022
Answered
Problem referencing inPoint
- April 6, 2022
- 1 reply
- 533 views
I'm trying to create a bar-graph animation, where I put in the percentage, and then it automatically slides in over X number of frames (in this case, 20 frames), as dictated by a controller layer. But instead of the animation beginning at the inPoint of the layer and then ending 20 frames later, the animation begins at the inPoint and then jumps to the final value at frame 20 of the composition (not the layer). What's really strange is that it is smooth at the outPoint, without any jumping.
slideInDuration = thisComp.frameDuration * thisComp.layer("Controller").effect("Slide In+Out - frames")("Fade In Duration (frames)");
slideOutDuration = thisComp.frameDuration * thisComp.layer("Controller").effect("Slide In+Out - frames")("Fade Out Duration (frames)");
slideInAmount = linear(time, thisLayer.inPoint, thisLayer.inPoint+slideInDuration+0.001, -23, value);
slideOutAmount = linear(time, thisLayer.outPoint-slideOutDuration-0.001, thisLayer.outPoint, value, -23);
if (time<slideInDuration) {slideInAmount}
else if (time<slideOutDuration) {value}
else if (time<thisLayer.outPoint) {slideOutAmount}
else {-23}
Please help! Thanks.
