MakeTail

Introduced

4.0

Description

Creates a tail rig from a collection of guide objects, or a guide curve. A tail (light green chain) is controlled by a set of one-bone control chains (dark green). The control chain roots (cubes) can be manipulated for animation control of the rig, while the control chain effectors (hidden) are connected to springs for a dyanmics effect. The number of guide objects / curve control points determines the number of control chains, while the NbTailBones argument determines the number of bones in the tail.

Optionally a shadow rig can be attached to the tail. Shadow objects will be created for each chain element in the tail, and pose constrained to the tail objects. Shadow rigs can be used to plot animation off of a rig.

Scripting Syntax

    MakeTail( Parent, GuideObjectCollection, [NbTailBones], [ShadowType], [ShadowParent], [CharacterSetName], [ShadowCharacterSetName] )

Parameters

Parameter | Type | Description
Parent | String | The object to which the new tail will be parented. If null, the scene root will be used.
GuideObjectCollection | String | A collection of guide objects or a curve used to create the tail. At least three guide objects are required, or if a curve is used the curve must have at least three control points.
NbTailBones [in/out] | Integer | The number of bones on the tracing chain. Default Value: 2
ShadowType | Integer | The type of shadow rig to attach. Shadow rigs can be used to transfer or remap animation. Default Value: 0 Possible Values: • 0: No shadow • 1: SI|3D Skeleton shadow rig • 2: XSI Skeleton shadow rig • 3: Null shadow rig • 4: Box shadow rig
ShadowParent | String | Parent of the shadow rig hiearchy. If empty, no shadow rig is generated.
CharacterSetName | String | The name of the character set that should be used for this chain; it gets stored in a Custom PSet for use. Default Value: ""
ShadowCharacterSetName | String | The name of the shadow character set that should be used for this chain. Default Value: ""

Return Value

Returns a Tail JScript object.

Examples

JScript Example

    /*
       This example creates a 10-bone tail with a box shadow.
    */

    var guidecoll = new ActiveXObject("XSI.Collection");

    var lXfm = XSIMath.CreateTransform();

    for(var i=0;i<5;i++)
    {
       guidecoll.Add( GetPrim("Null", "Guide_Tail") );
       lXfm.SetTranslationFromValues(2*i,0,0);
       guidecoll(i).Kinematics.Global.Transform = lXfm;
    }

    var tail = MakeTail(null,        //Parent (if null uses scene root)
           guidecoll,          //Guide Objects
           10,                 //Nb Tail Bones
           4,                  //Shadow type (4=box shadow)
           ActiveSceneRoot);   //Shadow parent
    DumpTail(tail);

    function DumpTail(inTail)
    {
       logmessage ("Data in the tail object:");
       logmessage ("------------------------");
       logmessage ("Nb Points     : " + inTail.nbPoints);
       logmessage ("Control Chains: " + inTail.ControlChains);
       logmessage ("Control Root  : " + inTail.Root);
       logmessage ("Trace Chain   : " + inTail.TraceChain);
       logmessage ("Trace Root    : " + inTail.TraceRoot);
       logmessage ("Hidden        : " + inTail.Hidden);
       logmessage ("Envelope      : " + inTail.Envelope);
       logmessage ("Shadow Start  : " + inTail.ShadowStart);
       logmessage ("Shadow Ends   : " + inTail.ShadowEnds);
       logmessage ("Shadow Objects: " + inTail.Shadows);
    }

    //
    // Output from running this example:
    //
    //INFO : Data in the tail object:
    //INFO : ------------------------
    //INFO : Nb Points     : 5
    //INFO : Control Chains: root,bone,eff,root1,bone1,eff1,root2,bone2,eff2,root3,bone3,eff3
    //INFO : Control Root  : root
    //INFO : Trace Chain   : root4,Tail1,Tail2,Tail3,Tail4,Tail5,Tail6,Tail7,Tail8,Tail9,Tail10,Tail11
    //INFO : Trace Root    : root4
    //INFO : Hidden        : eff,eff1,eff2,eff3
    //INFO : Envelope      : Tail1,Tail2,Tail3,Tail4,Tail5,Tail6,Tail7,Tail8,Tail9,Tail10,Tail11
    //INFO : Shadow Start  : Tail12
    //INFO : Shadow Ends   : Tail21
    //INFO : Shadow Objects: Tail12,Tail13,Tail14,Tail15,Tail16,Tail17,Tail18,Tail19,Tail20,Tail21
    //

See Also

MakeTorso | MakeBelly

Autodesk Softimage v7.5