Barycentric_Morph_Controller : MorphController

Barycentric_Morph_Controller - superclass: MorphController; super-superclass:MAXWrapper - classID: #(160575522, 0)


createMorphObject <source_node>

Turns the given scene node into a Morph compound object - does nothing if it already is a Morph object. The returned morph object has a morph controller created accessible via the morph property.

Note: This class is not available in Autodesk VIZ.

You can access the morph controller on a morph compound object via the <node>.morph property, for example:

c = $foo.morph -- get the morph controller

mk1 = c.keys[1] -- get the first morph key


addMorphTarget <morph_controller> <target_node> <add_method>

Adds a new morph target object to the given morph controller. The <add_method> argument defines the method of attaching the target and should be a number between 1 and 4 with the following interpretation:

1 -- by reference

2 -- by copy

3 -- by move

4 -- by instance

The return value is an Integer giving the target index of the added target object.

setMorphTarget <morph_controller> <target_index_integer> <target_node> <add_method>

Replaces an existing target with a different scene node. The arguments are the same as for addMorphTarget().

getMKTargetNames <morph_controller>

Returns an array of names of the targets in the given morph controller.

deleteMorphTarget <morph_controller> <target_index_integer>

Deletes the numbered morph target in the given controller.

setMorphTargetName <morph_controller> <target_index_integer> <name_string>

Changes the target name of the numbered target in the given morph controller.

getMKTargetWeights <morph_controller> <time> <dest_array>

A quick way of retrieving all the target weights for a given key at the time specified. The targets are placed into <dest_array> which must be an array of the right size. You can find out how many targets there by getting the size of the array returned by the getMKTargetNames() function which returns an array of target names.

getMKKey <morph_controller> <time>

Returns the morph key on the given controller at the specified time, yields undefined if there is no key at that time.

getMKKeyIndex <morph_controller> <time>

Returns the index of the key at the specified time, yields undefined if there is no key at that time.


When using the addnewkey() method to create a key for the Barycentric_Morph_Controller controller, the time component of the key value returned is usually not correct. Use the getMKKey() method to access the created key.

See also

Barycentric_Morph_Controller Keys

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods