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
|