Contents

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 & NSObjectProtocol

Parameters

  • 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 0 and 1 representing the weight of the keyframe to the right of the current time vs the keyframe to the left of the current time. A weight of 0 means the same value as the keyframe to the left; a weight of 1 means 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.

See Also

Instance Methods