Extrapolation (FCurve)

Description

Sets or returns the extrapolation type of the function curve as one of the siFCurveExtrapolation enum values.

C# Syntax

    // get accessor
    siFCurveExtrapolation rtn = FCurve.Extrapolation;

    // set accessor
    FCurve.Extrapolation = siFCurveExtrapolation;

Examples

VBScript Example

    '
    '  This example demonstrates how to get and set
    '  an FCurve's extrapolation.
    '
    Main()

    function WriteExtrapolation (in_extrapolation)
       if in_extrapolation = 1 then
           WriteExtrapolation = "siConstantExtrapolation"
       elseif in_extrapolation = 2 then
           WriteExtrapolation = "siLinearExtrapolation"
       elseif in_extrapolation = 3 then
           WriteExtrapolation = "siPeriodicExtrapolation"
       elseif in_extrapolation = 4 then
           WriteExtrapolation = "siPeriodicRelativeExtrapolation"
       else
           WriteExtrapolation = "Invalid Extrapolation type"
       end if
    end function

    sub Main()
       set oCube = ActiveSceneRoot.AddGeometry("Cube","MeshSurface")
       dim aValues
       aValues = Array(0.00, 5.00, 1.00, 6.00, 2.00, 7.00, 3.00, 8.00, 4.00, 9.00, 5.00, 10.00)
       set oFCurve = oCube.PosX.AddFCurve2( aValues)

       LogMessage "FCurve extrapolation : " & WriteExtrapolation(oFCurve.Extrapolation)
       oFCurve.Extrapolation = siLinearExtrapolation
       LogMessage "FCurve extrapolation : " & WriteExtrapolation(oFCurve.Extrapolation)
    end sub

    ' Outputs:
    'INFO : FCurve extrapolation : siConstantExtrapolation
    'INFO : FCurve extrapolation : siLinearExtrapolation

See Also

FCurve Interpolation and Extrapolation

Autodesk Softimage v7.5