v4.0
矩形のロッドにアタッチされた 2 つのスプリングからなる、腹のリグを作成します。ロッドは、2 つのガイド オブジェクトを使用して作成された 1 ボーンのチェインです。 ガイド オブジェクトはロッドの最上部と最下部の位置を決定します。 一方のスプリングは、ロッドのベースを指定のヒップのオブジェクトに接続します。もう一方のスプリングはロッドの上部を脊椎のオブジェクトに接続します。 ForwardRotationPerc 引数は、スプリングの接続ポイントをヒップから遠い位置に移動し、脊椎をロッドに近い位置に移動するために使用します。
oBelly = MakeBelly( HipObject, VertebraObject, GuideObjectCollection, [ForwardRotationPerc] ); |
Belly JScript オブジェクトを戻します。
| パラメータ | タイプ | 説明 |
|---|---|---|
| HipObject | 文字列 | 腹部アセンブリの下部を構成するリグの親。 |
| VertebraObject | 文字列 | 腹部アセンブリの上部を構成するリグの親。 通常はヒップの次の 1 番目の脊椎です。 |
| GuideObjectCollection | 文字列 | 2 つのオブジェクトが順に並んだコレクション。下腹部のガイド マーカー、腹上部のガイド マーカー。 |
| ForwardRotationPerc | Double |
腹部の回転ポイントの割合は、スパインとヒップ プレートから渡されます。 デフォルト値: 0.25 |
/*
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" |