Value > MAXWrapper > Animation Controllers > Controller |
All controllers have the following properties:
<controller>.keys MAXKeyArray -- read-only, the controller’s key array <controller>.value varies -- get or set the current controller value
The keys and value properties provide access to the value and keys in a free-standing controller. It is useful when working with the global tracks controllers that are accessible in MAXScript. The controllers that are not keyframeable return an empty KeyArray for their keys property.
The value property is sensitive to the current time and animate contexts, so you can use it to evaluate a controller at various times or to plant keyframes in the controllers that support keys.
You can only assign a value to a controller’s value property if the controller is a key-based controller. The only exception to this is that you can assign a Matrix3 value to a PRS controller’s value property. MAXScript automatically sets the individual position, rotation, and scale values to the values represented in the Matrix3 value.
If an Ease Curve is assigned to a controller, the following controller-related sub-property is available:
If a MultiplierCurve is assigned to a controller, the following controller-related sub-property is available:
See Ease and Multiplier Curve Functions for methods and notes related to Ease and Multiplier curves.
All animatable properties in 3ds Max objects let you reference several controller-related sub-properties. These are:
A boolean indicating whether the property is animated.
Read-only, gets the property’s controller’s key array
Read-only, boolean, true if controller is key-framable
Boolean, true if controller is keyable, false if set to unkeyable
Read-only, boolean, true if controller's value represent HSV colors
The track property is a simple synonym for controller . If an animatable property does not have an assigned controller, the isAnimated property returns false and the controller , track , and keys properties return undefined .
You can create controllers like other 3ds Max objects by calling the class' constructor function:
and assign them to animatable properties by assigning to the controller property in those animatables.
Returns an array of controllers assigned to the vertices in the mesh or spline. If no controller is assigned to a vertex, the array element value will be undefined. For editable splines, each knot consists of three vertices: the in vector, knot, and out vector. The array of controllers returned is a "snapshot" of the current controllers. If controllers are assigned or changed for a vertex, this change is not reflected in the array. If a vertex is added/deleted, the array is not resized to reflect the change in number of vertices.
Returns the controller currently assigned to the vertex, undefined if no controller is assigned.
Returns the controller for specified vertex in the specified spline, undefined if no controller is assigned. Each spline knot consists of three vertices: the in vector, knot, and out vector.
Applying a controller to a property causes the controller to take on the properties value at frame 0. If keys are present for the controller before the assignment to the property, all keys will be adjusted by the difference between the controller’s value at frame 0 and the property’s value. This is shown in the following example.
Displays the modal controller dialog, if any. The string will be in the dialog title bar. If the controller is a keyframe controller, the key info dialog is displayed for the selected keys. If no keys are selected, no dialog is displayed.
Clears the 'new' flag on the MAXScript wrapper for the controller.
When this flag is set, when you assign the controller to a property, the initial value of the controller is set to the property value.
When you create an instance of a controller, this flag is set.
It is normally cleared only after the controller is assigned to a property.
Available in 3ds Max 2008 and higher. Previously, it was available in the Avguard Extensions .
isController <value>
Returns true if the value wraps a controller.
Controllers that can be keyframed support several time and key-related functions as described in the following topics:
Controller Out-Of-Range Functions
Controller Ease and Multiplier Curve Functions