Moves the current time to the previous key frame for the specified animated parameters.
oDouble = PrevKey( [InputObjs], [Time], [Tolerance], [Layer] ); |
Returns the frame number of the previous key frame as a Double. If there is no key then the following is returned: -1.#INF for C++, "-1.#INF" for VBScript and Number.NEGATIVE_INFINITY for JScript.
Parameter | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
InputObjs | String |
List of animatable parameters (for example "cone*/kine.local.pos"). Default Value: Currently selected and marked parameters |
||||||||
Time | Number |
Move to the key before this frame. Default Value: Current frame |
||||||||
Tolerance | Double |
Frame tolerance Default Value: Nearest 0.5 frame (-1)
|
||||||||
Layer | Integer |
Animation layer Default Value: Current animation layer (-1) |
' create a null with some animation set o = getprim("null") Translate o, -10, 5, 0, siRelative, siView, siObj, siXYZ savekey o & "/kine.local.pos", 1 Translate o, 10, -5, 0, siRelative, siView, siObj, siXYZ savekey o & "/kine.local.pos", 50 Translate o, 10, 5, 0, siRelative, siView, siObj, siXYZ savekey o & "/kine.local.pos", 75 ' Process all the keys prior to the current frame LastFrame PrevKeys ( o & "/kine.local.pos" ) sub PrevKeys (params) frame = PrevKey( params ) do while frame <> "-1.#INF" LogMessage "There is a key at frame " & frame frame = PrevKey( params ) loop end sub 'INFO : "There is a key at frame 75" 'INFO : "There is a key at frame 50" 'INFO : "There is a key at frame 1" |