How to set the ending or starting keyframe value in an Expression Control in After Effects?

To set ending keyframe value:

[code]

if (numKeys > 1){
newV2 = comp(“DECAY”).layer(“Grass Controls”).effect(“Wind Speed”)(“Angle”);
v1 = valueAtTime(key(1).time);
v2 = valueAtTime(key(2).time);
linear(value,v1,v2,v1,newV2);
}else{
value
}

[/code]

 

To set starting keyframe value:

[code]

if (numKeys > 1){
newV2 = comp(“DECAY”).layer(“Grass Controls”).effect(“Wind Speed”)(“Angle”);
v1 = valueAtTime(key(1).time);
v2 = valueAtTime(key(2).time);
linear(value,v2,v1,newV2,v1);
}else{
value
}

[/code]

 

Reference:

Expression to Control a Single Keyframe’s value

Leave a Reply

Your email address will not be published. Required fields are marked *