v4.0
3 つのガイド オブジェクトから、スパインまたはスケルトンのヘッド リグを作成します。ガイド オブジェクトは、頭のベース、首、頭部を配置します。 必要に応じて、耳を生成するためにガイドオブジェクトを渡すこともできます(尻尾と同様の形式。「MakeTail」を参照)。
必要に応じて、頭にシャドウ リグをアタッチすることができます。 シャドウ オブジェクトは各チェイン エレメントまたは頭部のスパインの椎に対して作成され、そのオブジェクトにポーズで拘束されます。 シャドウ リグはリグのアニメーションをプロットする際に使用できます。
顎を作成するには、MakeHead を使用し、首のガイド オブジェクト(ガイド コレクションの 2 番目のオブジェクト)を複製します。 顎の作成には、最低限 2 個の首ガイドを複製する必要があります(例を参照)。
スケルトンの頭を使用する場合は、頭部ガイド オブジェクト(ガイド コレクションの 3 番目のオブジェクト)を複製することにより新しいボーンを首に追加できます。 新しいボーンは複製オブジェクトごとに作成されます(例を参照)。
oHead = MakeHead( Parent, GuideObjectCollection, [Prefix], [AssemblyType], [HeadType], [NbDivisions], [StretchType], Sliders, EarGuideCollection, [ShadowType], [ShadowParent] ); |
Head JScript オブジェクトを戻します。
| パラメータ | タイプ | 説明 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parent | 文字列 | 新しい頭の親となるオブジェクト。 | ||||||||||||
| GuideObjectCollection | 文字列 | 頭のベース、首、頭部の 3 つのガイド オブジェクトのコレクション。 | ||||||||||||
| Prefix | 文字列 | 新しい頭を作成する際に、新しいオブジェクトの名前に付加するプリフィックス。 たとえば、「L」、「R」など。 | ||||||||||||
| AssemblyType | Integer |
使用する頭部アセンブリのスタイル。 デフォルト値: 0
|
||||||||||||
| HeadType | Integer |
ボックス シャドウの作成に使用される頭のタイプ。 デフォルト値: 0
|
||||||||||||
| NbDivisions | Integer |
スパイン タイプの頭部アセンブリを選択した場合の、首の分割数。 デフォルト値: 2 |
||||||||||||
| StretchType | Integer |
首のスパインが頭のコントローラに追従して自動的にストレッチするか、一定の長さを保持するかを指定します。 デフォルト値: 0
|
||||||||||||
| Sliders | 文字列 | スパイン パラメータを配置するスライダの PPG。 何も指定しないと、スパイン カーブにスライダ ページが追加されます。 | ||||||||||||
| EarGuideCollection | 文字列 | 耳のスプリング チェインの開始オブジェクトのコレクション。 空の場合には、耳は作成されません。 | ||||||||||||
| ShadowType | Integer |
アタッチするシャドウ リグのタイプ。 シャドウ リグは、アニメーションを転送または再マップするために使用します。 デフォルト値: 0
|
||||||||||||
| ShadowParent | 文字列 | シャドウ リグ階層の親。 空の場合には、シャドウ リグは作成されません。 |
/*
This example makes two heads using the same three
guide objects. The first head uses a spine, the
second head uses a skeleton.
*/
var guidecoll = new ActiveXObject("XSI.Collection");
guidecoll.Add( GetPrim("Null", "Guide_Base") );
guidecoll.Add( GetPrim("Null", "Guide_Neck") );
guidecoll.Add( GetPrim("Null", "Guide_Head") );
//
// Can duplicate the neck guide to generate a jaw.
// At least two duplicates are required to create a jaw.
//
jaw0 = GetPrim("Null", "Guide_Neck1"); //duplicated neck for jaw
jaw1 = GetPrim("Null", "Guide_Neck2"); //duplicated neck for jaw
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(1,2,0);
jaw0.Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(2,2,0);
jaw1.Kinematics.Global.Transform = lXfm;
//
// Make the heads.
//
var Head= MakeHead( ActiveSceneRoot,//parent
guidecoll, //guide objects
"ABC", //prefix
1, //spine head and neck
0, //biped head
3, //nb of spine divisions
0); //stretch using spine scale
lXfm.SetTranslationFromValues(-4,0,0);
guidecoll(0).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-4,2,0);
guidecoll(1).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-4,4,0);
guidecoll(2).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-3,2,0);
jaw0.Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-2,2,0);
jaw1.Kinematics.Global.Transform = lXfm;
//
// Can duplicate the head guide to make a longer head.
//
head0= GetPrim("Null", "Guide_Head1");
head1= GetPrim("Null", "Guide_Head2");
head2= GetPrim("Null", "Guide_Head3");
head3= GetPrim("Null", "Guide_Head4");
head4= GetPrim("Null", "Guide_Head5");
lXfm.SetTranslationFromValues(-4,5,0); head0.Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-4,6,0); head1.Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-4,7,0); head2.Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-4,8,0); head3.Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-4,9,0); head4.Kinematics.Global.Transform = lXfm;
//
// Make the skeleton head with extended neck
//
Head = MakeHead( ActiveSceneRoot, //parent
guidecoll, //guide objects
"123", //prefix
0, //skeleton neck
0, //biped head
3, //nb of spine divisions
0); //stretch using spine scale |