Instance Method

interpolateBetween:withWeight:

Returns a new parameter value which has been calculated by interpolating between two key values.

Required.

Declaration

- (id<NSCoding>)interpolateBetween:(id<NSCoding>)rightValue withWeight:(float)weight;

Parameters

rightValue

The value of the 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 zero 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 plug-in requests the value of its parameter at a time between keyframes, or when the application displays the user interface.