SetKeyTangents (FCurve)

Description

Sets the values of the tangency values on both sides of the key value.

Note: You can only set key tangents on standard fcurves; all other fcurves return a error (E_FAIL in COM/C++).

Scripting Syntax

FCurve.SetKeyTangents( Tangents )

C# Syntax

FCurve.SetKeyTangents( Object in_vsaTangents );

Parameters

Parameter

Type

Description

Tangents

Array of Doubles

1-dimensional array containing the tangents: LeftTanX, LeftTanY, RightTanX, RightTanY.

The LeftTanX and RightTanX must be in key frames and LeftTanY and RightTanY must be valid key values.

Examples

JScript Example

/*
   This JScript example demonstrates how to set key tangents on an fcurve.
*/

var oNull = ActiveSceneRoot.AddNull();
var oFCurve = oNull.posx.AddFCurve2( new Array( 1, 10, 2, 20, 3, 30 ) );

// Set Zero sloped tangents on keys
oFCurve.SetKeyTangents( 
   new Array( 
       -0.5, 0, 0.5, 0, 
       -0.5, 0, 0.5, 0, 
       -0.5, 0, 0.5, 0 
   )
)

See Also

FCurveKey.LeftTanX

FCurveKey.LeftTanY

FCurveKey.RightTanX

FCurveKey.RightTanY



Autodesk Softimage v7.5