AddFCurveItem (ActionDelta)

Description

Adds a new ActionDeltaItem of type siModificationDeltaFCurves to an ActionDelta created with the Delta.AddAction method.

The ActionDelta should be of type siModificationDeltaFCurves to use this method (see siModificationDeltaType for a list of ActionDelta types).

Scripting Syntax

    ActionDelta.AddFCurveItem( Target, [KeyValueArray], [Interpolation], [Type], [Extrapolation] )

C# Syntax

    ActionDeltaItem ActionDelta.AddFCurveItem( Object in_vTarget, Object in_KeyValueArray, Object in_vInterpolation, Object in_vType, Object in_vExtrapolation );

Parameters

Parameter | Type | Description
Target | String | Target path for source item
KeyValueArray | Array of key data | The array may be a 1- or 2-dimensional array. For 2-dimensional arrays the first dimension must define the key values. These contain 6 values per key for fcurves of interpolation type siCubicInterpolation (see siFCurveInterpolation) and 2 values for keys for the other fcurve interpolation types. The first value is the key time (in frames) and the second in the key value (in value units). For Cubic (or bezier) fcurves the remaining 4 values are the tangency values for: lefttanx (in frames), lefttany (in value units), righttanx (in frames), and righttany (in value units).
Interpolation | siFCurveInterpolation | The interpolation of the FCurve Default Value: siCubicInterpolation
Type | siFCurveType | The type of the FCurve. Default Value: siStandardFCurve
Extrapolation | siFCurveExtrapolation | The extrapolation of the FCurve Default Value: siConstantExtrapolation

Return Value

ActionDeltaItem

Examples

JScript Example

    /*
       This example demonstrates how to add an ActionDeltaItem of type
       siModificationDeltaFCurves to a ActionDelta.
    */
    NewScene (null, false);

    // Create a reference model from a cube
    var oRoot = Application.ActiveProject.ActiveScene.Root;
    var oCube = oRoot.AddGeometry("Cube", "MeshSurface");
    var emdlFileRefModel = XSIUtils.BuildPath(Application.InstallationPath(siProjectPath), "Models", "MyModel.emdl");
    CreateModelAndConvertToRef(oCube, emdlFileRefModel);

    // Add the Delta object
    var oDelta = AddDelta(oCube.Model);

    // Add an action of type siModificationDeltaFCurves
    var oDeltaAction = oDelta.AddAction(siModificationDeltaFCurve);

    // Set the array
    var aKeyData = Array
    (
    1.00, 5.00, 0, 0, 0, 0,
    100.00, 8.00, 0, 0, 0, 0
    );

    // Add the fcurve item
    var oActionDeltaItem = oDeltaAction.AddFCurveItem(oCube + ".kine.global.posx", aKeyData);

    // Apply modification
    oDelta.Apply();

See Also

ActionDelta.AddConstraintItem | ActionDelta.AddStaticValueItem | ActionDelta.AddExpressionItem

Autodesk Softimage v7.5