v4.0
3 ボーンの足のリグを作成します。足のリグは 6 つまたはそれ以上のガイド オブジェクトのコレクションから作成されます(ガイドの要件は、下記の GuideObjectCollection パラメータを参照してください)。
MakeFoot で作成したリグには、足コントロールと回転コントロールが含まれます。 必要に応じて分散コントロールを作成でき、通常、ドッグ レッグに IK を分散する際に使用します。 IK 分散コントロールは、デフォルトではMakeDogLegによって作成されます。
必要に応じて、足にシャドウ リグをアタッチすることができます。 シャドウ オブジェクトは足の各チェイン エレメントに対して作成され、シャドウ ボーンは実際の足のボーンにポーズで拘束されます。 シャドウ リグはリグのアニメーションをプロットする際に使用できます。
oFoot = MakeFoot( Model, Parent, [ShortPrefix], [FullPrefix], GuideObjectCollection, Sliders, [Extension], [ShadowType], [ShadowParent], [ThreeBoneToe] ); |
Foot JScript オブジェクトを戻します。
| パラメータ | タイプ | 説明 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | 文字列 | 足が所属するモデル。 | ||||||||||||
| Parent | 文字列 | 足のコントロールの親。 | ||||||||||||
| ShortPrefix | 文字列 | 新しいリグに使用する短い名前(通常は「L」または「R」)。 プリフィックスが指定されない場合は、その入力を求めるダイアログ ボックスが表示されます。 | ||||||||||||
| FullPrefix | 文字列 | 新しいリグに使用する長い名前(通常は「Left」または「Right」)。 プリフィックスが指定されない場合は、その入力を求めるダイアログ ボックスが表示されます。 | ||||||||||||
| GuideObjectCollection | 文字列 | 足を作成する際に検索される最低 6 つのオブジェクトのリスト。Middle Pivot、Right Pivot、Left Pivot に加えて、足の開始位置からつま先までつながっているオブジェクトが 3 つ以上必要です(すなわち、足には少なくとも 2 ボーンのチェインが必要です)。 その他のアイテムを脚全体の長さに加えることができます。 | ||||||||||||
| Sliders | 文字列 | 足のパラメータのスライダ PPG。 何も指定しないと、スライダ ページが作成されます。 | ||||||||||||
| Extension | Boolean |
ドッグレッグの IK 分散をコントロールするために、Extension オブジェクトを作成するかどうかを指定します。 True の場合は、Extension アイコンが作成されます。 デフォルト値: False |
||||||||||||
| ShadowType | Integer |
足にアタッチするシャドウ リグのタイプ。 シャドウ リグは、アニメーションを転送または再マップするために使用します。 デフォルト値: 0
|
||||||||||||
| ShadowParent | 文字列 | シャドウ リグ階層の親。 空の場合には、シャドウ リグは作成されません。 | ||||||||||||
| ThreeBoneToe | Boolean |
True の場合、3 ボーンのつま先が作成されます。 デフォルト値: True |
/*
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 |