[][src]Type Definition ofx_sys::OfxCustomParamInterpFuncV1

type OfxCustomParamInterpFuncV1 = Option<unsafe extern "C" fn(instance: OfxParamSetHandle, inArgs: OfxPropertySetHandle, outArgs: OfxPropertySetHandle) -> OfxStatus>;

@brief Function prototype for custom parameter interpolation callback functions

\arg instance the plugin instance that this parameter occurs in \arg inArgs handle holding the following properties...

  • kOfxPropName - the name of the custom parameter to interpolate
  • kOfxPropTime - absolute time the interpolation is ocurring at
  • kOfxParamPropCustomValue - string property that gives the value of the two keyframes to interpolate, in this case 2D
  • kOfxParamPropInterpolationTime - 2D double property that gives the time of the two keyframes we are interpolating
  • kOfxParamPropInterpolationAmount - 1D double property indicating how much to interpolate between the two keyframes

\arg outArgs handle holding the following properties to be set

  • kOfxParamPropCustomValue - the value of the interpolated custom parameter, in this case 1D

This function allows custom parameters to animate by performing interpolation between keys.

The plugin needs to parse the two strings encoding keyframes on either side of the time we need a value for. It should then interpolate a new value for it, encode it into a string and set the ::kOfxParamPropCustomValue property with this on the outArgs handle.

The interp value is a linear interpolation amount, however his may be derived from a cubic (or other) curve.