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);
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
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
Copy link to clipboard
Copied
Dan, thank you so much!! Worked a treat.
Thanks for the quick response, and being there to answer everyone's questions all the time!