MaxScript with CATRigs
 
 
 

CATParent

the CATParent stores the information about a rig that the whole rig shares, including the name of the rig the CATUnits value. It also holds the layers system details, including the name of each layer and its global weight.

ShowProperties $<CATParent>

 .CATName (CATRig) : string  .CATUnits : worldUnits  .Layers : float  .CATMode : integer  .LengthAxis : string  .Node : node  .RootHub : control .CATVersion : integer  .CATRigSpace : matrix3  .CATRigNodes : node by value array  .CATRigLayerCtrls : control by value array  .NumLayers : integer  .SelectedLayer : integer  .SoloLayer : integer  .TrackDisplayMethod : integer  .Layers : float

ShowInterfaces $<CATParent>

 Interface: CATParentFPInterface   Properties:    .CATMode : integer : Read|Write|Validated by Validator function    .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   Methods:    <void>AddHub() <boolean>LoadRig <TSTR>filename    <boolean>SaveRig <TSTR>filename    <node>GetBoneByAddress <TSTR by value>Address <void>UpdateUserProps()   Actions:
 Interface: LayerRootFPInterface   Properties:    .NumLayers : integer : Read .SelectedLayer : integer : Read|Write    .SoloLayer : integer : Read|Write    .TrackDisplayMethod : integer : Read|Write   Methods: <integer>AppendLayer <TSTR>name <name>method method Validated by Validator function    <boolean>InsertLayer <TSTR>name <integer>layerID <name>method method Validated by Validator function    <void>RemoveLayer <integer>layerID    <void>MoveLayerUp <integer>layerID <void>MoveLayerDown <integer>layerID    <boolean>SaveClip <TSTR>filename <time>starttime <time>endtime <integer>startlayer <integer>endlayer    <boolean>SavePose <TSTR>filename <node>LoadClip <TSTR>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 <TSTR>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    <TSTR>GetFileTagValue <TSTR>filename <TSTR>tag    <boolean>LoadHTR <TSTR>filename <TSTR>camfile    <boolean>LoadBVH <TSTR>filename <TSTR>camfile <boolean>LoadFBX <TSTR>filename <TSTR>camfile <boolean>LoadBIP <TSTR>filename <TSTR>camfile <void>CollapsePoseToCurLayer()    <boolean>CollapseTimeRangeToLayer <time>StartTime <time>Endtime <time>Frequency quiet:<boolean> quiet default value: true    <void>CopyLayer <index>LayerID <void>PasteLayer Instance:<boolean> CopyLayerInfo:<boolean> Instance default value: false       CopyLayerInfo default value: true   Actions: OK

CATControl

Every controller bone in the CATRig structure exposes this interface. That means that every bone will return the CATParent, and a name and can be used to save out a clip file, for example.

ShowInterfaces $<CATBone>[3].controller

 Interface: CATControlInterface   Properties:    .CATParent : node : Read .Name : TSTR by value : Read|Write   Methods:    <void>PasteLayer <control>source <integer>fromindex <integer>toindex <boolean>instance    <void>PasteRig <control>source <boolean>SaveClip <TSTR>filename <time>StartTime <time>EndTime    <node>LoadClip <TSTR>filename <time>time <boolean>mirrordata    <boolean>SavePose <TSTR>filename <node>LoadPose <TSTR>filename <time>time <boolean>mirrordata Actions:
CATParent

Use this to access the CATParent from any CATBone. This means that if you have a pointer to a finger bone, then you can access the CATParent and perform all the layer operations, and so on.

Example:

$<CATBoneName>[3].CATParent
Name

The local name of this bone.

<void>PasteLayer <control>source <integer>fromindex <integer>toindex <boolean>instance

Use this function to paste rig settings from another CATBone

<void>PasteRig <control>source

Use this function to paste rig settings from another CATBone

<boolean>SaveClip <TSTR>filename <time>StartTime <time>EndTime

Use this function to save a pose file from a script.

<node>LoadClip <TSTR>filename <time>time <boolean>mirrordata

Use this function to load a clip file from a script.

<boolean>SavePose <TSTR>filename

Use this function to save a pose file from a script.

<node>LoadPose <TSTR>filename <time>time <boolean>mirrordata

Use this function to load a pose file from a script.

CATNodeControl

In addition to the CATControl Interface, every bone exposes the CATNodeControl interface.

 Interface: CATNodeControlFPInterface   Properties:    .NumArbBones : integer : Read    .Node : node : Read    .Address : TSTR by value : Read .SetupTM : matrix3 by value : Read|Write    .tmBoneParent : matrix3 by value : Read    .tmBoneWorld : matrix3 by value : Read    .tmBoneLocal : matrix3 by value : Read    .LocalScale : point3 by value : Read .tmChildParent : matrix3 by value : Read    .Stretchy : boolean : Read|Write    .EffectHierarchy : boolean : Read|Write    .ApplyTransforms : boolean : Read|Write    .NumLayerFloats : integer : Read    .ExtraBones : control by value array : Read    .SetupModeLocks : bitArray : Read|Write|Validated by Validator function    .AnimationLocks : bitArray : Read|Write|Validated by Validator function    .MirrorBone : node : Read|Write   Methods:    <control>AddArbBone() <control>GetArbBone <index>index    <control>CreateLayerFloat() Actions:  Interface: ExtraRigNodesInterface   Properties:    .ExtraRigNodes : node by value array : Read|Write   Methods:    <void>AddExtraRigNodes <node by value array>nodes    <void>RemoveExtraRigNodes <node by value array>nodes

What this means is that you can always access the node of a bone by using the convention:

<catrigbone>.node

Example:

If you have a bone selected that has extra bones added to it, like a head bone that has facial bones, you can use the following:

($[3].GetArbBone 1).node

You will then have the node of the first extra bone that is attached to the selected bone.

Note: Internally, an “Extra” bone is called an “Arb” (arbitrary) bone. An Arb bone has no predefined use, unlike finger, limb, or tail bones, all of which have predefined uses.

Hubs

The Hub bone exposes a unique interface for features available only to hubs. This includes things like adding arms and legs and tails.

 Interface: HubFPInterface   Properties:    .PinHub : boolean : Read|Write .OrientTM : matrix3 : Read    .DangleCtrl : control : Read   Methods: <void>CollapsePoseToCurLayer()    <void>CollapseTimeRangeToCurrLayer <time>StartTime <time>EndTime <time>Frequency <void>AddArm()    <void>AddLeg()    <void>AddSpine() <void>AddTail()   Actions:

Limbs

ShowInterfaces $<LimbBone>[3][1].controller

 Interface: LimbFPInterface   Properties:    .IKTarget : node : Read    .IsLeg : boolean : Read    .IsArm : boolean : Read    .LMR : integer : Read|Write    .SymLimb : control : Read   Methods:    <void>CollapsePoseToCurLayer() <void>CollapseTimeRangeToCurrLayer <time>StartTime <time>EndTime <time>Frequency    <void>CreateIKTarget() <void>MoveIKTargetToEndOfLimb()   Actions:  Interface: CATControlInterface Properties:    .CATParent : node : Read    .Name : TSTR by value : Read|Write   Methods:    <void>PasteLayer <control>source <integer>fromindex <integer>toindex <boolean>instance <void>PasteRig <control>source    <boolean>SaveClip <TSTR>filename <time>StartTime <time>EndTime <node>LoadClip <TSTR>filename <time>time <boolean>mirrordata <boolean>SavePose <TSTR>filename    <node>LoadPose <TSTR>filename <time>time <boolean>mirrordata Actions:

Tails

 Interface: Tail Functions   Properties:   Methods:    <void>CollapsePoseToCurLayer() <void>CollapseTimeRangeToCurrLayer <time>StartTime <time>EndTime <time>Frequency   Actions:  Interface: CATControlInterface   Properties:    .CATParent : node : Read .Name : TSTR by value : Read|Write   Methods:    <void>PasteLayer <control>source <integer>fromindex <integer>toindex <boolean>instance    <void>PasteRig <control>source <boolean>mirrordata    <boolean>SaveClip <TSTR>filename <time>StartTime <time>EndTime    <node>LoadClip <TSTR>filename <time>time <boolean>mirrordata <boolean>SavePose <TSTR>filename    <node>LoadPose <TSTR>filename <time>time <boolean>mirrordata Actions:

OK