FCurve.Extrapolation

FCurve.Extrapolation

説明

siFCurveExtrapolation 列挙型の値の 1 つとして、F カーブの外挿タイプを設定したり、戻したりします。

詳細については、Softimage ユーザ ガイドの「F カーブの補間および外挿」を参照してください。

C#構文

// get accessor

siFCurveExtrapolation rtn = FCurve.Extrapolation;

// set accessor

FCurve.Extrapolation = siFCurveExtrapolation;

VBScript の例

'

'	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