FCurve.Keys

Description

Returns an FCurveKeyCollection containing each FCurveKey object on the function curve.

C# Syntax

// get accessor
FCurveKeyCollection rtn = FCurve.Keys;
// set accessor
FCurve.Keys = FCurveKeyCollection;

Examples

VBScript Example

'
'	This example demonstrates how to get the keys on an FCurve.
'
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)
' Write the fcurve keys
for each k in oFCurve.Keys
	LogMessage k.Name &" Value: " & k.Value
	LogMessage k.Name &" Locked: " & k.Locked
	LogMessage k.Name &" Left: " & k.Left
	LogMessage k.Name &" Right: " & k.Right
	LogMessage k.Name &" LeftTanX: " & k.LeftTanX
	LogMessage k.Name &" LeftTanY: " & k.LeftTanY
	LogMessage k.Name &" RightTanX: " & k.RightTanX
	LogMessage k.Name &" RightTanY: " & k.RightTanY
	LogMessage k.Name &" Interpolation: " & k.Interpolation
	LogMessage k.Name &" Constraint(siParameterConstraint): " & k.Constraint(siParameterConstraint)
	LogMessage k.Name &" Time: " & k.Time
next
' Outputs:
'INFO :  Value: 5
'INFO :  Locked: False
'INFO :  Left: 5
'INFO :  Right: 5
'INFO :  LeftTanX: 0
'INFO :  LeftTanY: 0
'INFO :  RightTanX: 0.333333333333333
'INFO :  RightTanY: 0
'INFO :  Interpolation: 3
'INFO :  Constraint(siParameterConstraint): False
'INFO :  Time: 0
'	etc.
'INFO :  Value: 10
'INFO :  Locked: False
'INFO :  Left: 10
'INFO :  Right: 10
'INFO :  LeftTanX: -0.333333333333333
'INFO :  LeftTanY: 0
'INFO :  RightTanX: 0
'INFO :  RightTanY: 0
'INFO :  Interpolation: 3
'INFO :  Constraint(siParameterConstraint): False
'INFO :  Time: 5

See Also

FCurve.GetKey FCurve.GetKeysBetween FCurve.GetNumKeys