PasteKeys
 
 
 

PasteKeys

Description

Pastes FCurveKeys from the buffer onto one or more FCurves for the specified timerange (from StartFrame to EndFrame). FCurve keys are placed in the buffer by using the CutKeys or CopyKeys commands.

Tip: You specify each fcurve to paste onto by identifying the parameter it drives in the InputObjs argument.

PasteKeys is the command equivalent of the paste action in the dopesheet and should be used when trying to emulate dopesheet behaviour.

Note: This command uses output arguments. C# and some scripting languages (such as JScript, PerlScript and Python) don't support arguments passed by reference so you need to use the best workaround for your situation:

For scripting languages this command returns an ISIVTCollection which you can use to get the output arguments.

For C# you can use the XSIApplication.ExecuteCommand method to call this command. ExecuteCommand packs the output arguments into a C# System.Object containing an Array of the output arguments (see Calling Commands from C#).

Scripting Syntax

PasteKeys( [InputObjs], [StartFrame], [EndFrame], [Ripple], [Merge], [Type], [Offset], [Relative], [LeftContinuity], [RightContinuity] );

Parameters

Parameter Type Description
InputObjs String List of animatable parameters (for example "cone*/kine.local.pos"). This parameter uses the Type parameter to interpret which parameters to use in this way:

- If Type == siInputParameters then InputObjs is used exactly as input (either from the specified list or the animatable parameters on the selected objects).

- If Type == siAnimatedParameters then InputObjs is expected to be a list of objects on which each animatable parameter will be affected.

- If Type == siAllAnimatedParameters then the value of InputObjs is ignored and instead the command uses all animated parameters on all objects in the entire scene.

Default Value: If no value is specified for this parameter, the Object List will use the selected objects or parameters respecting the scope indicated by the Type argument.

StartFrame Double Lower bound of the frame interval

Default Value: 1

EndFrame Double Upper bound of the frame interval

Default Value: 100

Ripple Boolean Flag to ripple the keys

Default Value: True

Merge Boolean Flag to specify whether we merge (default) or replace keys when pasting

Default Value: True

Type siParameterScope Parameter scope of the operation

Default Value: siInputParameters

Offset Double Offset (new Upper Bound) from the Lower Bound of the pasted frame interval
Relative Boolean Flag to specify whether the key values should be pasted relative to the start frame.

Default Value: False

LeftContinuity Integer This parameter controls how the first pasted key value is determined.

Default Value: 0

Possible Values:

Description:

0 Use key value
1 Use fcurve value
2 Use average of fcurve and pasted key value
RightContinuity Integer This parameter controls how the last pasted key value is determined.

Default Value: 0

Possible Values:

Description:

0 Use key value
1 Use fcurve value
2 Use average of fcurve and pasted key value

See Also

SelectKeysInTimespan DeselectAllKeys CopyKeys CutKeys DeleteKeys