Eyeon:Script/Reference/Applications/Fusion/Classes/BezierSpline/GetKeyFrames
From VFXPedia
Contents |
Tool[Spline] : GetKeyFrames
Arguments
GetKeyFrames()
Returns
Returns a table containing information about a spline control's animation keyframes.
Remarks
While Operator:GetKeyFrames() returns a table of the tool's valid extent, and Input:GetKeyFrames() returns a table of the keyframe times for any animation, when GetKeyFrames() is called from a BezierSpline modifier, it will return a table fully describing the spline's curvature.
The data returned consists of a table of subtables, one for each keyframe and with a key value of the keyframe's time. The subtables contain an entry for the keyframe's value, and optionally, subtables for the left and/or right handles, keyed by "LH" and "RH". The handle subtables contain two entries, for the handle's X & Y position.
An example table for a spline with three keyframes follows:
{ [0.0] = { 2.0, RH = { 12.666667, 2.0 } }, [38.0] = { 3.86, LH = { 25.333333, 3.666667 }, RH = { 46.0, 4.0 } }, [62.0] = { 2.5, LH = { 54.0, 2.5 } } }
Requirements
- eyeonScript 5.0
- Fusion 5.0
Examples
local spline, splineout, splinedata -- assuming animation on Blur1.Blend -- gets the spline output that's connected to the Blend input, splineout = Blur1.Blend:GetConnectedOutput() -- then uses GetTool() to get the Bezier Spline modifier itself, and if splineout then spline = splineout:GetTool() -- then uses GetKeyFrames() to get a table of a spline data. This splinedata = spline:GetKeyFrames() -- data is then dumped. dump(splinedata) end
See Also
SetKeyFrames(), Operator:GetKeyFrames(), Input:GetKeyFrames()
Tips for GetKeyFrames (edit)
EyeonTips:Script/Reference/Applications/Fusion/Classes/BezierSpline/GetKeyFrames