Manual     Reference     Scripting  
  
Scripting > Runtime Classes > AnimationCurve   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Enumerations
  • History
  • Index
  • AnimationCurve
  • All Members
  • Variables
  • keys
  • length
  • postWrapMode
  • preWrapMode
  • this [int index]
  • Constructors
  • AnimationCurve
  • Functions
  • AddKey
  • Evaluate
  • MoveKey
  • RemoveKey
  • SmoothTangents
  • Class Functions
  • EaseInOut
  • Linear

AnimationCurve.AddKey  

function AddKey (time : float, value : float) : int

Description

Add a new key to the curve.

Smooth tangents are automatically computed for the key. Returns the index of the added key. If no key could be added because there is already another keyframe at the same time -1 will be returned.

See Also: keys variable.

function AddKey (key : Keyframe) : int

Description

Add a new key to the curve.

Returns the index of the added key. If no key could be added because there is already another keyframe at the same time -1 will be returned.

See Also: keys variable, Keyframe struct.