' create a null to hold animation
GetPrim "Null"
' Save some keys on the X position of the Null object
SaveKey "Null.kine.local.posx", 1, -5.0
SaveKey "Null.kine.local.posx", 25, 7.0
SaveKey "Null.kine.local.posx", 50, 2.0
' Get the animation source of type FCurve
set collection = GetSource( "Null.kine.local.posx",siFCurveSource )
for each fcurve in collection
' get fcurve info
GetFCurveInfo fcurve, crvtype, nokeyval, nbKeys, extrap, segtype, lowclamp, highclamp
LogMessage "FCurve: " & vbCR & vbLF & _
"Type : " & crvtype & vbCR & vbLF & _
"No Key Value : " & nokeyval& vbCR & vbLF & _
"Num Keys : " & nbKeys& vbCR & vbLF & _
"Extrapolation : " & extrap & vbCR & vbLF & _
"Default Segment Type : " & segtype& vbCR & vbLF & _
"Low Clamp : " & seglowclamp & vbCR & vbLF & _
"High Clamp : " & highclamp & vbCR & vbLF
for i = 0 to nbkeys - 1
' get fcurvekey info
GetKeyInfo fcurve, i, parameter, leftval, rightval, lefttanparam, lefttanval, righttanparam, righttanval, rightsegkind, constraints
LogMessage "Key: " & i & vbCR & vbLF & _
"KeyParam : " & parameter & vbCR & vbLF & _
"LeftValue: " & leftval & vbCR & vbLF & _
"RightValue: " & rightval & vbCR & vbLF & _
"LeftTanParam: " & lefttanparam & vbCR & vbLF & _
"LeftTanValue: " & lefttanval & vbCR & vbLF & _
"RightTanParam: " & righttanparam & vbCR & vbLF & _
"RightTanValue: " & righttanval & vbCR & vbLF & _
"RightSegKind: " & rightsegkind & vbCR & vbLF & _
"Constraints: " & constraints & vbCR & vbLF
next
next
'INFO : "FCurve:
'Type : 20
'No Key Value : -5
'Num Keys : 3
'Extrapolation : 1
'Default Segment Type : 3
'Low Clamp :
'High Clamp : 1.79769313486232E+308
'"
'INFO : "Key: 0
'KeyParam : 3.33666666666667E-02
'LeftValue: -5
'RightValue: -5
'LeftTanParam: 0
'LeftTanValue: 0
'RightTanParam: 0.266933333333333
'RightTanValue: 0
'RightSegKind: 3
'Constraints: 260
'"
'INFO : "Key: 1
'KeyParam : 0.834166666666667
'LeftValue: 7
'RightValue: 7
'LeftTanParam: -0.266933333333333
'LeftTanValue: -1.14285714285714
'RightTanParam: 0.278055555555556
'RightTanValue: 1.19047619047619
'RightSegKind: 3
'Constraints: 260
'"
'INFO : "Key: 2
'KeyParam : 1.66833333333333
'LeftValue: 2
'RightValue: 2
'LeftTanParam: -0.278055555555556
'LeftTanValue: 0
'RightTanParam: 0
'RightTanValue: 0
'RightSegKind: 3
'Constraints: 260
'" |