v4.0
Creates a torso rig consisting of a spine, left and right
shoulders, and a hip. The torso is rigged with controls for the
chest, hip and upper body.
A collection of 10 or 11 guide objects defines the torso. The first
four guide objects determine the shape of the spine. The next six
define the left side of the torso (left leg base, left shouder
base, left shoulder tip, right leg base, right shouder base, right
shoulder tip). An 11th guide object can be added to create a chest
bone. A hip icon is created with hip sockets positioned at the leg
bases, and the top of the hip is positioned at the base of the
spine. One bone shoulder is created using the shoulder base and tip
guide objects.
A tail can be generated using MakeTorso by duplicating the spine
base control object, the first object in the guide object
collection. A minimum of 3 spine base duplicates are needed to
generate a tail (see example).
oTorso = MakeTorso( Parent, [NbDivisions], [StretchType], GuideObjectCollection, [ControlType], [SpineType], Sliders, [ShadowType], [ShadowParent], [NegativeScale] ); |
Returns a Torso JScript object.
Parameter | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parent | String | The object to which the torso will be parented. This is usually the global SRT. | ||||||||||||
NbDivisions | Integer | The number of spine divisions. The number of vertebra will be
NbDivisions+1 .
Default Value: 2 |
||||||||||||
StretchType | Integer | Whether the spine should stretch to follow the chest
controller, or maintain a constant length.
Default Value: 0
|
||||||||||||
GuideObjectCollection | String | A collection of 10 or 11 guide objects (an 11th guide object can be used as the target for a chest bone). The first four bones describe the spine path: 1) spine base, 2) spine base depth, 3) spine end depth, 4) spine end; the next three define the left side appendages of the torso: 5) left leg start, 6) left shoulder start, 7) left shoulder end; the next three define the right side appendages: 8) right leg start, 9) right shoulder start, 10) right shoulder end. The 11th object is optional and describes the chest bone position. If included, MakeTorso draws a spine to the end of this position and makes a chest bone between the position and the spine end (item #4). | ||||||||||||
ControlType | Integer | Type of icon to use for chest, hip, and upper body controls.
Default Value: 0
|
||||||||||||
SpineType | Integer | The style of head assembly to be used.
Default Value: 0
|
||||||||||||
Sliders | String | A slider PPG to put the spine parameters on. If none is supplied a slider page is added on the spine Curve. | ||||||||||||
ShadowType | Integer | The type of shadow rig to attach. Shadow rigs can be used to
transfer or remap animation.
Default Value: 0
|
||||||||||||
ShadowParent | String | Parent of the shadow rig hiearchy. If empty, no shadow rig is generated. | ||||||||||||
NegativeScale | Integer | Negative scaling on the shoulders. Negative scaling is useful
for manipulating the left and right shoulders symmetrically.
Default Value: 0
|
/* This script builds a collection of torso guide objects places them and constructs a torso using the makeTorso command. */ var guidecoll = new ActiveXObject("XSI.Collection"); guidecoll.Add( GetPrim("Null", "Guide_SpineBase") ); guidecoll.Add( GetPrim("Null", "Guide_SpineDepth") ); guidecoll.Add( GetPrim("Null", "Guide_SpineEndDepth") ); guidecoll.Add( GetPrim("Null", "Guide_SpineEnd") ); guidecoll.Add( GetPrim("Null", "Guide_LLegStart") ); guidecoll.Add( GetPrim("Null", "Guide_LShoulderStart") ); guidecoll.Add( GetPrim("Null", "Guide_LShoulderEnd") ); guidecoll.Add( GetPrim("Null", "Guide_RLegStart") ); guidecoll.Add( GetPrim("Null", "Guide_RShoulderStart") ); guidecoll.Add( GetPrim("Null", "Guide_RShoulderEnd") ); var lXfm = guidecoll(0).Kinematics.Global.Transform; lXfm.SetTranslationFromValues(0,0,0); guidecoll(0).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(0,2,0); guidecoll(1).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(0,4,0); guidecoll(2).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(0,6,0); guidecoll(3).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(2,0,0); guidecoll(4).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(2,6,0); guidecoll(5).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(4,6,0); guidecoll(6).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-2,0,0); guidecoll(7).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-2,6,0); guidecoll(8).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-4,6,0); guidecoll(9).Kinematics.Global.Transform = lXfm; // // Duplicate the spine base guide to generate a tail. // At least 3 duplicates are required. // var tail0 = GetPrim("Null", "Guide_SpineBase1"); var tail1 = GetPrim("Null", "Guide_SpineBase2"); var tail2 = GetPrim("Null", "Guide_SpineBase3"); lXfm.SetTranslationFromValues(0,0,-2); tail0.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(0,0,-4); tail1.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(0,0,-6); tail2.Kinematics.Global.Transform = lXfm; // // Make the torso // var Torso= MakeTorso( ActiveSceneRoot, //parent 3, //# vertebrae 0, //stretch using spine scale guidecoll, //guide objects 1, //cube controls 0); //quat spine with polygon divs DumpTorso(Torso); function DumpTorso(inTorso) { logmessage("Data in the returned torso object:"); logmessage("Parent : "+ inTorso.Parent); logmessage("Spine Curve : "+ inTorso.Spine.Curve); logmessage("Hip Bone : "+ inTorso.HipBone); logmessage("Right Effector : "+ inTorso.REff); logmessage("Left Effector : "+ inTorso.LEff); logmessage("Right Skeleton : "+ inTorso.RSkel); logmessage("Left Skeleton : "+ inTorso.LSkel); logmessage("Spine Vertebrae: "+ inTorso.Spine.Vertebra); logmessage("Upper Body : "+ inTorso.UpperBody); logmessage("Hip : "+ inTorso.Hip); logmessage("Chest : "+ inTorso.Chest); logmessage("Hidden : "+ inTorso.Hidden); logmessage("Envelope : "+ inTorso.Envelope); logmessage("Shadows : "+ inTorso.Shadows); } //results from running this script: //INFO : "Data in the returned torso object:" //INFO : "Parent : undefined" //INFO : "Spine Curve : crvlist" //INFO : "Hip Bone : Hip" //INFO : "Right Effector : RShoulderRoot" //INFO : "Left Effector : LShoulderRoot" //INFO : "Right Skeleton : RShoulder,RShoulderEff,RShoulderRoot" //INFO : "Left Skeleton : LShoulder,LShoulderEff,LShoulderRoot" //INFO : "Spine Vertebrae: Vertebra,Vertebra1,Vertebra2" //INFO : "Upper Body : UpperBody" //INFO : "Hip : Hip1" //INFO : "Chest : Chest" //INFO : "Hidden : SpineStart,SpineEnd,RShoulderRoot,LShoulderRoot" //INFO : "Envelope : Hip,RShoulderEff,LShoulderEff" //INFO : "Shadows : undefined" |