Copy link to clipboard
Copied
Besides setting ease/linear/etc, I understand that an expression cannot make 'ease' adjustments, i.e. change the specific velocity/influence of a keyframe... BUT... what if you have an expression that changes, say, the time position of an existing keyframe which is, say, 'easy ease' and therefore has existing keyframe velocity settings?
For example, imagine this code snippet...
t1 = blahblah;
t2 = blahblahblah;
v1 = valueAtTime(key(1).time);
v2 = valueAtTime(key(2).time);
ease(time,t1,t2,v1,v2)
Would the two keyframes above keep their ease influence settings despite moving in time?
Thanks in advance for any insight offered 🙂
Copy link to clipboard
Copied
If you're not changing the values at the keyframes, you can keep the original easing by only remapping the time, something like this:
tA = 3; // new time for keyframe 1
tB = 4; // new time for keyframe 2
t1 = key(1).time; // original time for keyframe 1
t2 = key(2).time; // original time for keyframe 2
t = linear(time,tA,tB,t1,t2); // remap current time back to origianl time
valueAtTime(t)
This is not a complete solution, but you get the idea.
Dan
Copy link to clipboard
Copied
Fab stuff Dan - Thanks for your help, much appreciated 🙂