Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

AddKey(time: float, value: float): int;
int AddKey(float time, float value);
def AddKey(time as float, value as float) as 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.

AddKey(key: Keyframe): int;
int AddKey(Keyframe key);
def AddKey(key as Keyframe) as 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.