PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

GetKeyframes

GetKeyframes returns an array that contains all Keyframes that have been added to a KeyframeSequence.

Returns

Return Type Summary

An array of Keyframes


Code Samples


Get KeyframeSequence Length

This sample contains a simple function that will get the length of a KeyframeSequence by finding the Keyframe with the highest Keyframe.Time value.

local function getSequenceLength(keyframeSequence)
	local length = 0
	for _, keyframe in pairs(keyframeSequence:GetKeyframes()) do 
		if keyframe.Time > length then 
			length = keyframe.Time 
		end
	end
	return length
end