MakeFoot
 
 
 

MakeFoot

Introduced

v4.0

Description

Creates a rigged three bone foot. The foot rig is created from a collection of 6 or more guide objects (see the GuideObjectCollection parameter below for guide requirements).

The rig created by MakeFoot contains a foot control and roll control. It can optionally create a distribution control, typically used for the dog leg IK distribution. This IK distribution control is created by default by MakeDogLeg.

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

Scripting Syntax

oFoot = MakeFoot( Model, Parent, [ShortPrefix], [FullPrefix], GuideObjectCollection, Sliders, [Extension], [ShadowType], [ShadowParent], [ThreeBoneToe] );

Return Value

Returns a Foot JScript object.

Parameters

Parameter Type Description
Model String The model that the foot will belong to.
Parent String The parent of the foot controls
ShortPrefix String The short name (typically "L" or "R") to be used in the new rig. If the prefix is not given a dialog box appears prompting for one.
FullPrefix String The long name (typically "Left" or "Right") to be used in the new rig. If the prefix is not given a dialog box appears prompting for one.
GuideObjectCollection String A list of at least 6 objects to search for when making the foot: Middle Pivot; Right Pivot; Left Pivot; and at least 3 objects running from the start of the foot to the end of the toe (this means the foot must be at least a two bone chain). Extra items are added onto the length of the foot.
Sliders String A slider PPG for foot parameters. If none is supplied a slider page is created.
Extension Boolean Whether or not an Extension object is made for controlling dog leg IK distribution. If true ,an extension icon is created.

Default Value: False

ShadowType Integer The type of shadow rig to attach to the foot. Shadow rigs can be used to transfer or remap animation.

Default Value: 0

Possible Values:

Description:

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.
ThreeBoneToe Boolean True to create three-bone toes.

Default Value: True

Examples

JScript Example

/*
        This script creates a three bone foot. 
*/
var guidecoll = new ActiveXObject("XSI.Collection");
guidecoll.Add( GetPrim("Null", "Guide_MiddlePivot") ); 
guidecoll.Add( GetPrim("Null", "Guide_RightPivot") ); 
guidecoll.Add( GetPrim("Null", "Guide_LeftPivot") ); 
guidecoll.Add( GetPrim("Null", "Guide_Ankle") ); 
guidecoll.Add( GetPrim("Null", "Guide_Foot") ); 
guidecoll.Add( GetPrim("Null", "Guide_Toe") ); 
guidecoll.Add( GetPrim("Null", "Guide_Toe2") ); 
var lXfm = guidecoll(0).Kinematics.Global.Transform
var lNull = GetPrim("Null", "Feet");
/*
        Left Leg
*/
//Pivots
lXfm.SetTranslationFromValues(2,0,-0.5);
guidecoll(0).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(2.5,0,-0.5);
guidecoll(1).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(1.5,0,-0.5);
guidecoll(2).Kinematics.Global.Transform = lXfm;
//Foot
lXfm.SetTranslationFromValues(2,4 ,0.25);
guidecoll(3).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(2,1,2);
guidecoll(4).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(2,0.25,5);
guidecoll(5).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(2,0,8);
guidecoll(6).Kinematics.Global.Transform = lXfm;
var threeFoot = MakeFoot(lNull, GetPrim("Null", "ThreeBone"), "ABC", "ABCDE", guidecoll, null, null, null, null, true);
var twoFoot = MakeFoot(lNull, GetPrim("Null", "TwoBone"), "ABC", "ABCDE", guidecoll, null, null, null, null, false);
SelectObj("ThreeBone", "BRANCH", null);
Translate(null, -8.93099040438492, 0, 0, siRelative, siLocal, siObj, siXYZ, null, null, null, null, null, null, null, null, null, 0, null);
DumpFoot(twoFoot);
DumpFoot(threeFoot);
function DumpFoot(inFoot)
{
        logmessage ("------------------------");
        logmessage ("Data in the returned foot [" + inFoot.Parent + "]:");
        logmessage ("------------------------");
        logmessage ("Root        : " + inFoot.Root);
        logmessage ("Parent      : " + inFoot.Parent);
        logmessage ("BaseGuide   : " + inFoot.BaseGuide);
        logmessage ("FootGuides  : " + inFoot.FootGuides);
        logmessage ("Foot        : " + inFoot.Foot);
        logmessage ("Roll        : " + inFoot.Roll);
        logmessage ("Hidden      : " + inFoot.Hidden);
        logmessage ("Envelope    : " + inFoot.Envelope);
        logmessage ("Shadows     : " + inFoot.Shadows);
        logmessage ("ShadowsEnds : " + inFoot.ShadowEnds);
        logmessage ("Shadows     : " + inFoot.Shadows);
}
//results from running this script:
//INFO : Data in the returned foot:
//INFO : ------------------------
//INFO : Root        : ABCFootRoot
//INFO : Parent      : Parent
//INFO : BaseGuide   : ABCFootGuide4
//INFO : FootGuides  : ABCFootGuide1,ABCFootGuide2,ABCFootGuide3,ABCFootGuide4
//INFO : Foot        : ABCDEFoot
//INFO : Roll        : ABCDERoll
//INFO : Hidden      : ABCFootRoot,ABCFootEff,ABCFootBind1,ABCFootBind2,ABCFootBind3,ABCPivotBase,ABCPlacePivot,ABCPivotLeft,ABCPivotRight,ABCFootGuide1,ABCFootGuide2,ABCFootGuide3,ABCFootGuide4,ABCFootUpV1,ABCFootUpV2,ABCFootUpV3
//INFO : Envelope    : ABCFootBone1,ABCFootBone2,ABCFootBone3
//INFO : ShadowsStart: undefined
//INFO : ShadowsEnds : undefined
//INFO : Shadows     : undefined

See Also

MakeLeg MakeDogLeg