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

Using Markers and Expressions to animate slider value

New Here ,
Sep 25, 2018 Sep 25, 2018

Copy link to clipboard

Copied

Hello,

I have a pie chart set up in my animation, pie chard value comes from a dynamic source. I have everything working, but I want to replace the keyframe with layer markers instead. I've applied the below expression to the slider that's controlling "Pie Segment 1". After Effects is recognising the value change at each marker, but only when I remove any 4 of the 5 ease(time... lines below.

So, my question is, how can I combine multiple ease(time expressions within the same layer?

I hope this makes sense.

Thanks in advance for any help.

startMarker = thisComp.layer("Pie Segment 1").marker.key(1).time;

midMarker = thisComp.layer("Pie Segment 1").marker.key(2).time;

hold1Marker = thisComp.layer("Pie Segment 1").marker.key(3).time;

dynamicMarker = thisComp.layer("Pie Segment 1").marker.key(4).time;

hold2Marker = thisComp.layer("Pie Segment 1").marker.key(5).time;

endMarker = thisComp.layer("Pie Segment 1").marker.key(6).time;

startValue = 0;

midValue = 25;

dynamicValue = thisComp.layer("Display_Ctrl").effect("Slider Control")("Slider");

endValue = 0;

ease(time, startMarker, midMarker, startValue, midValue);

ease(time, midMarker, hold1Marker, midValue, midValue);

ease(time, hold1Marker, dynamicMarker, midValue, dynamicValue);

ease(time, dynamicMarker, hold2Marker, dynamicValue, dynamicValue);

ease(time, hold2Marker, endMarker, dynamicValue, endValue);

TOPICS
Expressions

Views

1.1K

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 , Sep 25, 2018 Sep 25, 2018

Like this:

if (time < midMarker){

  ease(time, startMarker, midMarker, startValue, midValue);

}else if (time < hold1Marker){

  ease(time, midMarker, hold1Marker, midValue, midValue);

}else if (time < dynamicMarker){

  ease(time, hold1Marker, dynamicMarker, midValue, dynamicValue);

}else if (time < hold2Marker){

  ease(time, dynamicMarker, hold2Marker, dynamicValue, dynamicValue);

}else{

  ease(time, hold2Marker, endMarker, dynamicValue, endValue);

}

Dan

Votes

Translate

Translate
Community Expert ,
Sep 25, 2018 Sep 25, 2018

Copy link to clipboard

Copied

Like this:

if (time < midMarker){

  ease(time, startMarker, midMarker, startValue, midValue);

}else if (time < hold1Marker){

  ease(time, midMarker, hold1Marker, midValue, midValue);

}else if (time < dynamicMarker){

  ease(time, hold1Marker, dynamicMarker, midValue, dynamicValue);

}else if (time < hold2Marker){

  ease(time, dynamicMarker, hold2Marker, dynamicValue, dynamicValue);

}else{

  ease(time, hold2Marker, endMarker, dynamicValue, endValue);

}

Dan

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
New Here ,
Sep 25, 2018 Sep 25, 2018

Copy link to clipboard

Copied

LATEST

Dan, thank you so much!! Worked a treat.

Thanks for the quick response, and being there to answer everyone's questions all the time!

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