Go to: Synopsis. Return value. Related. Flags. MEL examples.
pasteKey [-animation string] [-attribute string] [-clipboard string] [-connect boolean] [-copies uint] [-float floatrange] [-floatOffset float] [-includeUpperBound boolean] [-index uint] [-option string] [-time timerange] [-timeOffset time] [-valueOffset float]
[objects]
pasteKey is undoable, queryable, and editable.
The pasteKey command pastes curve segment hierarchies from the clipboard onto other objects or curves. If the object hierarchy from which the curve segments were copied or cut does not match the object hierarchy being pasted to, pasteKey will paste as much as it can match in the hierarchy. If animation from only one object is on the clipboard, it will be pasted to each of the target objects. If animation from more than one object is on the clipboard, selection list order determines what animation is pasted to which object.Valid operations include:
TbaseKeySetCmd.h
The way the keyset clipboard will be pasted to the specified object's attributes depends on the paste "-option" specified. Each of these options below will be explained using an example. For all the explanations, let us assume that there is a curve segment with 20 frames of animation on the keyset clipboard (you can put curve segments onto the clipboard using the cutKey or copyKey commands). We will call the animation curve that we are pasting to the target curve:
int | The number of curves pasted |
In query mode, return type is based on queried flag.
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
-attribute(-at)
|
string
|
![]() ![]() |
||
|
||||
-option(-o)
|
string
|
![]() |
||
|
||||
-clipboard(-cb)
|
string
|
![]() |
||
|
||||
-connect(-c)
|
boolean
|
![]() |
||
|
||||
-copies(-cp)
|
uint
|
![]() |
||
|
||||
-timeOffset(-to)
|
time
|
![]() |
||
|
||||
-floatOffset(-fo)
|
float
|
![]() |
||
|
||||
-valueOffset(-vo)
|
float
|
![]() |
||
|
||||
-index(-in)
|
uint
|
![]() |
||
|
||||
-time(-t)
|
timerange
|
![]() |
||
|
||||
-float(-f)
|
floatrange
|
![]() |
||
|
||||
-includeUpperBound(-iub)
|
boolean
|
![]() |
||
|
||||
-animation(-an)
|
string
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
// Paste keyframes onto nurbsSphere1's translateX attribute at time 10 // pasteKey -time 10 -attribute translateX nurbsSphere1; // Paste to all active objects, preserving the timing from the clipboard. // pasteKey;