Value > Collections > Collection Types > MAXKeyArray Values |
A MAXKeyArray represents all the keyframe keys in a 3ds Max controller track.
See also MAXKey Values, Working with MAXKey Values, and Controller Common Properties, Operators, and Methods.
MAXKeyArray values are mappable.
The key array can be accessed using the keys property on an animated 3ds Max object property.
If the 3ds Max object parameter is not yet animated (i.e., no controller has been assigned to the parameter), a value of undefined is returned.
The key array can be accessed using the keys property on a controller.
Returns the number of keys in the key array.
Returns a MAXKey value representing the indexed key in the key array. Indexes start at 1.
Deletes the indexed key. Key indexes are 1-based.
Adds a new key to the key array at the time specified. The value for the new key is the interpolated controller value at the specified time.
The new key is also selected if the #select optional argument is specified.
The value for the new key is the interpolated controller value at that time. addNewKey() will not add a key if a key already exists at the specified time.
The return value in this case is the key located at the specified time.
Deletes keys from the controller according to the optional symbolic argument supplied.
#allKeys (default): deletes all keys in the controller.
#selection : deletes the currently selected keys
Deletes the indexed key. Key indexes are 1-based.
Moves all keys by the time given. If #selection is specified, move the current selection otherwise move all keys.
Re-sorts keys according to their times. Some MAXKey operations can result in out of order keys and this function must be called to correctly order keys.
All of the above methods may re-sequence keys in the key array and so cause existing keys to take on different indexes, because key array indexes are time positional.
Take care when inserting and deleting keys into arrays that have individual keys in variables and other containers - MAXKey values are defined internally in terms of this index and so may point to different keys if you re-arrange the keys in a controller.
MAXKeyArrays also support mapped property assignment on their contents in the same way that pathname and array collections do on their contents.