FCurve.Set

Introduced

v5.1

Description

Copies the specified FCurve (source) to this FCurve (target).

Note: The operation is undoable. Any pending undo session previously set with FCurve.BeginEdit is automatically ended before copying the FCurve.

Scripting Syntax

FCurve.Set( FCurveToCopy );

Parameters

Parameter Type Description
FCurveToCopy FCurve The source FCurve to copy. You cannot set an FCurve which is connected to a non-boolean parameter with a boolean FCurve (a siBooleanFCurve from the siFCurveType enum).

Examples

JScript Example

var myCube = Application.ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" );
// Create and connect an fcurve to position X
var posx = myCube.posx;
var posxFc = posx.AddFCurve( siStandardFCurve );
// Add some keys
posxFc.Resample();
posxFc.LowClamp = 25.0;
posxFc.HighClamp = 75.0;
// Create and connect an fcurve to rotation X
var rotx = myCube.rotx;
var rotxFc = rotx.AddFCurve( siStandardFCurve );
// Set rotxFc with the posx fcurve
rotxFc.Set( posxFc );
Application.LogMessage( "rotxFc nb keys : " + rotxFc.Keys.Count );
Application.LogMessage( "rotxFc low clamp: " + rotxFc.LowClamp );
Application.LogMessage( "rotxFc high clamp: " + rotxFc.HighClamp );
// Expected output:
// INFO : rotxFc nb keys : 100
// INFO : rotxFc low clamp: 25
// INFO : rotxFc high clamp: 75

See Also

Parameter.AddFCurve CopyAnimation