• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Problem referencing inPoint

Explorer ,
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

207

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

Community Expert , Apr 06, 2022 Apr 06, 2022

Try replacing the last 4 lines with this:

time < inPoint + slideInDuration ? slideInAmount : slideOutAmount

Votes

Translate

Translate
Explorer ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

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

Votes

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 Expert ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

Try replacing the last 4 lines with this:

time < inPoint + slideInDuration ? slideInAmount : slideOutAmount

Votes

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
Explorer ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

LATEST

That's exactly what I need! Thank you!

Votes

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