v6.0
Manipulates the key selection for all keys in the timespan (from
StartFrame to EndFrame) on each of the curves from the input list
according to the specified selection mode. The selection mode
defines how to manipulate the current key selection: that is,
whether to reset, append, toggle, or remove keys from the selection
(use the DeselectAllKeys command
to clear the selection).
Tip: You specify each fcurve to paste onto by identifying the
parameter it drives in the InputObjs argument.
Note: Key selection is used and shown in the DopeSheet.
SelectKeysInTimespan( [InputObjs], Mode, [StartFrame], [EndFrame], [Type] ); |
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. |
Mode | siFCurveKeySelectionMode | Mode of key selection to perform.
Default Value: siSetKeySelection |
StartFrame | Double | Start frame of the range of keys to change selection on. Leave both Start and End blank for all keys. Value range -Inf, +Inf |
EndFrame | Double | End frame of the range of keys to change selection on. Leave both Start and End blank for all keys. Value range -Inf, +Inf |
Type | siParameterScope | Parameter scope of the operation
Default Value: siInputParameters |
' ' This example demonstrates how to use the SelectKeysInTimespan command by creating ' a simple null, animating it and then selecting some of its keys. If you want to ' use the DopeSheet to view keys selected via SelectKeysInTimespan, make sure you ' comment out the last line of the example (DeselectAllKeys). ' ' Create a null and animate it NewScene, False GetPrim "Null" Translate , -6.53833089859819, 3.35653805660097, -0.335653805660097, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0 SaveKey "null.kine.local.posx,null.kine.local.posy,null.kine.local.posz", 1 SetValue "PlayControl.Key", 25 SetValue "PlayControl.Current", 25 Translate , 13.2015980564052, 0.828774828790348, -8.28774828790347E-02, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0 SaveKey "null.kine.local.posx,null.kine.local.posy,null.kine.local.posz", 25 SetValue "PlayControl.Key", 50 SetValue "PlayControl.Current", 50 Translate , -12.2437534024705, -6.75451485464142, 0.675451485464142, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0 SaveKey "null.kine.local.posx,null.kine.local.posy,null.kine.local.posz", 50 SetValue "PlayControl.Key", 75 SetValue "PlayControl.Current", 75 Translate , 10.2864186748647, -1.78186588189925, 0.178186588189925, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0 SaveKey "null.kine.local.posx,null.kine.local.posy,null.kine.local.posz", 75 SetValue "PlayControl.Key", 100 SetValue "PlayControl.Current", 100 Translate , -10.9943908103816, 8.70213570229867, -0.870213570229867, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0 SaveKey "null.kine.local.posx,null.kine.local.posy,null.kine.local.posz", 100 ' Select all the keys between frames 25 and 50 (inclusive) on each of the posx, posy and posz curves. SelectKeysInTimespan "null.kine.local.posx,null.kine.local.posy,null.kine.local.posz", siSetKeySelection, 25, 50 ' If you wish you can now view that key selection opening a DopeSheet. The ' selected keys will be drawn in yellow. ' Select all the keys between frames 23 and 31 (inclusive) on each of the posx, posy and posz curves. ' And then add all the keys between frames 48 and 53 (inclusive) again on those same curves. SelectKeysInTimespan "null.kine.local.posx,null.kine.local.posy,null.kine.local.posz", siSetKeySelection, 23, 31 SelectKeysInTimespan "null.kine.local.posx,null.kine.local.posy,null.kine.local.posz", siAddToKeySelection, 48, 53 ' Deselect all the keys DeselectAllKeys |