Softimage SDK Programmer's Guide > Customizing with the SDK > Custom Properties > Property Page Controls >

# FCurve Widget

FCurve controls display a standard Softimage FCurve grid. They are associated to an underlying FCurve or FCurve parameter (often called a Profile Curve because it does not animate any parameter, but instead is available for use in any fashion the plug-in developer or user wishes).

You create them using the PPGLayout.AddFCurve or PPGLayout::AddFCurve method:

    // ** during parameter definition (for example, in the DefineLayout callback) **
    // use the convenience method to add the fcurve to the custom property
    var oParam = oCustomProperty.AddFCurveParameter( "MyFCurve" );

    // now to get the actual fcurve from the parameter, use [Get]Value (not [Get]Source)
    var oFCurve = oParam.Value;
    oFCurve.BeginEdit();
    oFCurve.AddKey( 0, 0 );
    oFCurve.AddKey( 50, 90 );
    oFCurve.AddKey( 100, 0 );
    oFCurve.EndEdit();

    // ** during control creation (for example, in the DefineLayout callback) **
    // by default, the height of the widget is 300 units
    var oItem = oLayout.AddFCurve( "MyFCurve", 250 );

Note

You can also use the PPGLayout.AddItem or PPGLayout::AddItem method with the siControlFCurve control type enum, but the PPGLayout.AddFCurve or PPGLayout::AddFCurve method is a little more convenient.

The underlying FCurve or FCurve parameter is a real instance of an FCurve or FCurve object, so that all methods and properties available on the FCurve or FCurve object are available dynamically through Logic, using Parameter.Value (from PPG.Inspected), which returns a ProjectItemCollection which you use in turn to get the particular item's parameter) to get a pointer to the FCurve or FCurve object (see Dynamically Changing Custom Properties).

The following item attributes are available:

Available on all Controls also as a property on the PPGItem object: | Common to many Controls: | Specific to the FCurve control:
--- | --- | ---
siUILabel siUIItems siUIType siUIWidthPercentage siUILabelPercentage siUILabelMinPixels | siUIContinue siUICX siUICY | siUIFCurveLabelX siUIFCurveLabelY siUIFCurveViewMinX siUIFCurveViewMinY siUIFCurveViewMaxX siUIFCurveViewMaxY siUIFCurveGridSpaceX siUIFCurveGridSpaceY siUIFCurveNoGrid siUIFCurveNoRulerX siUIFCurveNoRulerY siUIFCurveSnapX siUIFCurveSnapY siUIFCurveGhosting siUIFCurveColorNonBijective siUIFCurveShowTimeCursor