interpolateBetween(_:withWeight:)
Returns a new parameter value which has been calculated by interpolating between two key values.
Declaration
func interpolateBetween(_ rightValue: any NSCopying & NSSecureCoding & NSObjectProtocol, withWeight weight: Float) -> any NSCopying & NSSecureCoding & NSObjectProtocolParameters
- rightValue:
The value of the custom parameter at the keypoint to the right of the current time in the timeline.
- weight:
A floating-point value between
0and1representing the weight of the keyframe to the right of the current time vs the keyframe to the left of the current time. A weight of0means the same value as the keyframe to the left; a weight of1means the same value as the keyframe to the right.
Return Value
A new custom parameter value.
Discussion
This plug-in method is called by the host application when the user has added keyframes to a custom parameter, and the application needs to know the value of the parameter between keyframes. This may be when the application is rendering a frame between keyframes, or when the plugin requests the value of its parameter at a time between keyframes, or when the application displays UI.