Skip to content

niKeyframeData⚓︎

A collection of position, rotation, and scale keys used on NiKeyframeControllers.

This type inherits the following: niObject

Properties⚓︎

positionKeyCount⚓︎

Read-only. The number of position keys available.

Returns:

  • result (number)

positionKeys⚓︎

Read-only. The available position keys.

Returns:


positionType⚓︎

Read-only. The type of animation key used for position keys. Maps to values in ni.animationKeyType table.

Returns:


refCount⚓︎

Read-only. The number of references that exist for this object. When this value reaches zero, the object will be deleted.

Returns:

  • result (number)

rotationKeyCount⚓︎

Read-only. The number of rotation keys available.

Returns:

  • result (number)

rotationKeys⚓︎

Read-only. The available rotation keys.

Returns:


rotationType⚓︎

Read-only. The type of animation key used for rotation keys. Maps to values in ni.animationKeyType table.

Returns:


RTTI⚓︎

Read-only. The runtime type information for this object. This is an alias for the .runTimeTypeInformation property.

Returns:


runTimeTypeInformation⚓︎

Read-only. The runtime type information for this object.

Returns:


scaleKeyCount⚓︎

Read-only. The number of scale keys available.

Returns:

  • result (number)

scaleKeys⚓︎

Read-only. The available scale keys.

Returns:


scaleType⚓︎

Read-only. The type of animation key used for scale keys. Maps to values in ni.animationKeyType table.

Returns:


Methods⚓︎

clone⚓︎

Creates a copy of this object.

local result = myObject:clone()

Returns:


getPositionKeyIndex⚓︎

Returns the index of the closest position key with timing less than or equal to given time argument.

local lastKeyIndex = myObject:getPositionKeyIndex(time)

Parameters:

  • time (number)

Returns:

  • lastKeyIndex (integer, nil)

getRotationKeyIndex⚓︎

Returns the index of the closest rotation key with timing less than or equal to given time argument.

local lastKeyIndex = myObject:getRotationKeyIndex(time)

Parameters:

  • time (number)

Returns:

  • lastKeyIndex (integer, nil)

getScaleKeyIndex⚓︎

Returns the index of the closest scale key with timing less than or equal to given time argument.

local lastKeyIndex = myObject:getScaleKeyIndex(time)

Parameters:

  • time (number)

Returns:

  • lastKeyIndex (integer, nil)

isInstanceOfType⚓︎

Determines if the object is of a given type, or of a type derived from the given type.

local result = myObject:isInstanceOfType(type)

Parameters:

Returns:

  • result (boolean)

isOfType⚓︎

Determines if the object is of a given type.

local result = myObject:isOfType(type)

Parameters:

Returns:

  • result (boolean)

saveBinary⚓︎

Serializes the object, and writes it to the given file.

local success = myObject:saveBinary(path)

Parameters:

  • path (string): The path to write the file at, relative to the Morrowind installation folder.

Returns:

  • success (boolean): If true the object was successfully serialized.

updateDerivedValues⚓︎

This updates the keyframe data's position, rotation, and scale keys as is appropriate for their key types.

myObject:updateDerivedValues()