3ds Max CAT (CAT stands for Character Animation Tools) feature introduced in 3ds Max 2011 and refactored in 3ds Max 2013 provides a powerful platform for character animation that is also highly customizable. An important aspect of this is its accessibility to scripting.
3ds Max CAT implements a character rig as a tree hierarchy of controllers and objects.
All the standard MAXScript calling conventions for navigating hierarchies, accessing subanims, as well as getting, setting and inspecting controller properties work with 3ds Max CAT.
The 3ds Max CAT Function Publishing Interfaces expose Properties, Methods and Actions which allow you to use MAXScript to access objects written in C++. Many different types of objects can expose the same interface, thus allowing them to share the same MAXScript exposure. An example of this is that every controller in the CATRig provides the interface ICATControlFPInterface.
More specialized controllers such as HubTrans can additionally provide Interfaces that expose features relevant only to these types of controllers.
To find out what functions are available on controllers and objects, you can use two different MAXScript calls:
Syntax
ShowProperties <MaxObject>
Show <MaxObject>--alternative
Use Show()
or ShowProperties()
to find out what properties are available on an object or controller.
ShowInterfaces <MaxObject>
Use ShowInterfaces()
to find out what functions/methods and properties are available on an object or controller.
FOR EXAMPLE:
ShowProperties $Character001 .CATMode : integer .CATName : string .CATUnits : float .ColourMode : integer .LengthAxis : string .Node : node .RootHub : control .CATVersion : integer .CATRigSpace : matrix3 .CATRigNodes : node by value array .CATRigLayerCtrls : control by value array .RootTransformNode : node .NumLayers : integer .SelectedLayer : integer .SoloLayer : integer .TrackDisplayMethod : integer .Layers : float false ShowInterfaces $Character001 Interface: CATParentFPInterface Properties: .CATMode : integer : Read|Write|Validated by Validator function .CATName : string : Read|Write .CATUnits : float : Read|Write|Validated by Validator function .ColourMode : integer : Read|Write .LengthAxis : string : Read|Write|Validated by Validator function .Node : node : Read .RootHub : control : Read .CATVersion : integer : Read .CATRigSpace : matrix3 : Read .CATRigNodes : node by value array : Read .CATRigLayerCtrls : control by value array : Read .RootTransformNode : node : Read Methods: <void>AddHub() <boolean>LoadRig <string>filename <boolean>SaveRig <string>filename <node>GetBoneByAddress <string>Address <void>UpdateUserProps() <void>AddRootNode() Actions: Interface: LayerRootFPInterface Properties: .NumLayers : integer : Read .SelectedLayer : integer : Read|Write .SoloLayer : integer : Read|Write .TrackDisplayMethod : integer : Read|Write Methods: <integer>AppendLayer <string>name <name>method method Validated by Validator function <boolean>InsertLayer <string>name <integer>layerID <name>method method Validated by Validator function <void>RemoveLayer <integer>layerID <void>MoveLayerUp <integer>layerID <void>MoveLayerDown <integer>layerID <boolean>SaveClip <string>filename <time>starttime <time>endtime <integer>startlayer <integer>endlayer <boolean>SavePose <string>filename <node>LoadClip <string>filename <time>starttime scaledata: <boolean> transformdata: <boolean> mirrordata: <boolean> mirrorworldX: <boolean> mirrorworldY: <boolean> scaledata default value: true transformdata default value: true mirrordata default value: false mirrorworldX default value: false mirrorworldY default value: false <node>LoadPose <string>filename <time>starttime scaledata: <boolean> transformdata: <boolean> mirrordata: <boolean> mirrorworldX: <boolean> mirrorworldY: <boolean> scaledata default value: true transformdata default value: true mirrordata default value: false mirrorworldX default value: false mirrorworldY default value: false <string>CreatePasteLayerTransformNode() <string>GetFileTagValue <string>filename <string>tag <boolean>LoadHTR <string>filename <string>camfile <boolean>LoadBVH <string>filename <string>camfile <boolean>LoadFBX <string>filename <string>camfile <boolean>LoadBIP <string>filename <string>camfile <void>CollapsePoseToCurLayer() <boolean>CollapseTimeRangeToLayer <time>StartTime <time>Endtime <time>Frequency regularplot: <boolean> NumPasses: <integer> PosDeltaThreshold: <float> RotDeltaThreshold: <float> regularplot default value: false NumPasses default value: 2 PosDeltaThreshold default value: 1.0 RotDeltaThreshold default value: 5.0 <void>CopyLayer <index>LayerID <void>PasteLayer Instance: <boolean> CopyLayerInfo: <boolean> Instance default value: false CopyLayerInfo default value: true Actions: OK
Note that the properties exposed by an Interface will also appear as results of the ShowProperties()
call.
You can also call
ClassOf <MaxObject>
This returns the class name of the specified object.
To access the transform controller of a 3ds Max CAT bone object which represents the bone inside the controller tree hierarchy of a CATRig, use the following syntax:
$<NodeName>.transform.controller
A shorthand way of doing the same thing is:
$<NodeName>[3].controller
or, since the CAT Bone objects also provide a dedicated variable to access the transform controller,
$<NodeName>.TMcontroller