MakeBelly

Introduced

v4.0

Categories

character rigging

Description

Creates a belly rig consisting of two springs attached to a rectangular rod. The rod is a one-bone chain created using two guide objects. The guide objects determine the top and bottom position of the rod. One spring connects the base of the rod to the given hip object, the other spring connects the top of the rod to the vertebra object. The ForwardRotationPerc argument can be used to move the spring connection points away from the hip and vertebra closer to the rod.

Scripting Syntax

oBelly = MakeBelly( HipObject, VertebraObject, GuideObjectCollection, [ForwardRotationPerc] );

Return Value

Returns a Belly JScript object.

Parameters

Parameter Type Description
HipObject String The rigging parent that makes up the lower part of the belly assembly.
VertebraObject String The rigging parent for the upper part of the assembly. Typically the first vertebra after the hip.
GuideObjectCollection String A collection of two objects in the order: the lower stomach guide marker; the upper stomach guide marker.
ForwardRotationPerc Double The percentage the rotation points of the belly mass are forward from the spine and hip plate.

Default Value: 0.25

Examples

JScript Example

/*
        This example creates a belly attached to a hip icon.
        As the hip is rotated or translated the belly will
        swing with it.  
*/
//
// Create and position the hip
//
var guide = GetPrim("Null", "Guide_Hip") 
var hip = MakeHip(guide,
                0,3,-1.5,       //top  XYZ
                4,0,0); //side XYZ
var lXfm = hip.Kinematics.Global.Transform;
lXfm.SetTranslationFromValues(0,0,-4);
hip.Kinematics.Global.Transform = lXfm;
//
// Create a null to act as the base of the spine
// parent it to and position it above the hip
//
var Vertebra = GetPrim("Null", "Vertebra"); 
var lXfm = Vertebra.Kinematics.Global.Transform;
lXfm.SetTranslationFromValues(0,4,-5);
Vertebra.Kinematics.Global.Transform = lXfm;
hip.AddChild(Vertebra);
//
// Position the stomach guides
//
var guidecoll = new ActiveXObject("XSI.Collection");
guidecoll.Add( GetPrim("Null", "LowerStomach") ); 
guidecoll.Add( GetPrim("Null", "UpperStomach") ); 
var lXfm = guidecoll(0).Kinematics.Global.Transform;
lXfm.SetTranslationFromValues(0,0,0);
guidecoll(0).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(0,4,0);
guidecoll(1).Kinematics.Global.Transform = lXfm;
var Belly = MakeBelly(hip, Vertebra , guidecoll);
DumpBelly(Belly);
function DumpBelly(inBelly)
{
        logmessage ("Data in the returned belly object:");
        logmessage ("---------------------------------");
        logmessage ("BellyRoot :"+ inBelly.BellyRoot  );
        logmessage ("BellyBone :"+ inBelly.BellyBone  );
        logmessage ("BellyEff  :"+ inBelly.BellyEff   );
        logmessage ("UpperRoot :"+ inBelly.UpperRoot  );
        logmessage ("UpperBone :"+ inBelly.UpperBone  );
        logmessage ("UpperEff  :"+ inBelly.UpperEff   );
        logmessage ("LowerRoot :"+ inBelly.LowerRoot  );
        logmessage ("LowerBone :"+ inBelly.LowerBone  );
        logmessage ("LowerEff  :"+ inBelly.LowerEff   );
        logmessage ("Hidden    :"+ inBelly.Hidden     );
        logmessage ("Envelope  :"+ inBelly.Envelope   );
}
//results of running this script: 
//INFO : "Data in the returned belly object:"
//INFO : "---------------------------------"
//INFO : "BellyRoot :BellyRoot"
//INFO : "BellyBone :Belly"
//INFO : "BellyEff  :BellyEff"
//INFO : "UpperRoot :UpperBellyRoot"
//INFO : "UpperBone :UpperBellyBone"
//INFO : "UpperEff  :UpperBellyEff"
//INFO : "LowerRoot :LowerBellyRoot"
//INFO : "LowerBone :LowerBellyBone"
//INFO : "LowerEff  :LowerBellyEff"
//INFO : "Hidden    :BellyRoot,UpperBellyRoot,LowerBellyRoot,BellyEff,UpperBellyEff,LowerBellyEff"
//INFO : "Envelope  :Belly"

See Also

MakeTorso MakeSpine MakeTail Make2PointSlide