ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Pose 2 Pose with ONE SLIDER controlling a Layer with Multiple Sliders (And therefore: keyframes)

COW Forums : Adobe After Effects

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Filip Vandueren
Re: Pose 2 Pose with ONE SLIDER controlling a Layer with Multiple Sliders (And therefore: keyframes)
on May 9, 2019 at 6:11:41 pm

This works:

this is the expression that each of your six sliders should get, change the first line accordingly.
I have used a way of interpolating that will take into account the easing on your control-slider, so if you use eases or even hold-keyframes, that will all be reflect in the timing of the 6 controlled sliders.

myIndex = 1; // number of the slider.

sl=thisComp.layer("Null 1").effect("Slider Control")("Slider");

if (sl.numKeys>1 && time>sl.key(1).time && time<sl.key(sl.numKeys).time) {

nk = sl.nearestKey(time);
prevK = nk.time<time ? nk : sl.key(nk.index-1);
nextK = sl.key(prevK.index+1);

fromValue= (prevK.value == myIndex) ? 100 : 0;
toValue= (nextK.value == myIndex) ? 100 : 0;
if (prevK.value<nextK.value) {
linear(sl.value, prevK.value, nextK.value, fromValue, toValue);
} else {
linear(sl.value, nextK.value, prevK.value, toValue, fromValue);
}
} else {
sl.value == myIndex ? 100 : 0;
}




Posts IndexRead Thread 


Current Message Thread:





© 2019 CreativeCOW.net All Rights Reserved
[TOP]