FCurve.SelectedKeys
 
 
 

FCurve.SelectedKeys

Introduced

v6.0

Description

Returns an FCurveKeyCollection containing each FCurveKey object on the function curve. An FCurve only contains selected keys if FCurve.Selected returns true.

C# Syntax

// get accessor
FCurveKeyCollection rtn = FCurve.SelectedKeys;

Examples

JScript Example

/*
        This example illustrates how to get the fcurve key selection
*/
// Create a null
oNull = Application.GetPrim("Null");
// Get the posx parameter of the null
oPosX = oNull.posx
// Create array of time-value pairs
aKeys = new Array(      0.00, 5.00,
                        1.00, 6.00,
                        2.00, 7.00,
                        3.00, 8.00,
                        4.00, 9.00,
                        5.00, 10.00 );
// Create an empty FCurve
oFCurve = oPosX.AddFCurve2( null, siStandardFCurve );
// Set the fcurve keys
oFCurve.SetKeys( aKeys );
// Select some keys
SelectKeysInTimespan(oPosX, siSetKeySelection, 2, 4, siInputParameters);
// Get selected fcurves
oFCurves = Application.FCurveSelection;
// Print selected key information
for (var i = 0; i < oFCurves.Count; i++) 
{
        Application.LogMessage( 'FCurve ' + i + ' has ' + oFCurves(i).SelectedKeys + ' keys selected', siInfo );
}
// Produces the following output:
//
//INFO : FCurve 0 has 3 keys selected

See Also

FCurve.GetKey FCurve.Keys FCurve.GetNumKeys FCurve.Selected XSIApplication.FCurveSelection SelectKeysInTimespan