Problem referencing inPoint

Community Beginner ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

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.

TOPICS
Dynamic link , Expressions , Scripting

Views

47

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Apr 06, 2022 Apr 06, 2022
Try replacing the last 4 lines with this: time < inPoint + slideInDuration ? slideInAmount : slideOutAmount

Likes

Translate

Translate
Community Beginner ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

I don't know that it matters, but I use Adobe CS5.5.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

Try replacing the last 4 lines with this:

time < inPoint + slideInDuration ? slideInAmount : slideOutAmount

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

LATEST

That's exactly what I need! Thank you!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines