Highlighted

Will a keyframe keep ease/influence settings when an Expression changes values of keyframe?

New Here ,
Apr 03, 2020

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 🙂

Topics

Expressions

Views

156

Likes

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

Will a keyframe keep ease/influence settings when an Expression changes values of keyframe?

New Here ,
Apr 03, 2020

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 🙂

Topics

Expressions

Views

157

Likes

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
Apr 03, 2020 0
Guide ,
Apr 03, 2020

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

Likes

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
Reply
Loading...
Apr 03, 2020 2
Christon LATEST
New Here ,
Apr 04, 2020

Copy link to clipboard

Copied

Fab stuff Dan - Thanks for your help, much appreciated 🙂

Likes

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
Reply
Loading...
Apr 04, 2020 0