v7.0
シーン項目(オブジェクト、モデル グループ、クラスタなど)を、その親の子リストの別の位置に移動します。 入力オブジェクトを直接最初または最後の位置に移動することも、シブリングをリファレンス オブジェクトに指定して、入力オブジェクトをリスト内でそのリファレンス オブジェクトの前と後のどちらに移動すべきかを示すことによって、特定のポイントを選択することもできます。
シブリングは、同じ階層レベルの別のシーン項目です。つまり、入力オブジェクトの親の直下の子です。
ReorderSceneItem( Parent, InputObj, MoveAction, [Marker] ); |
| パラメータ | タイプ | 説明 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parent | 文字列 | 位置を修正する子項目の親項目を指定します。 | ||||||||||
| InputObj | 文字列 | 順序を変更する対象となるシーン項目を指定します。 | ||||||||||
| MoveAction | Integer |
移動するシーン項目を指定します。最初の子、リファレンス項目の前/後、または最後の子のいずれかです。 デフォルト値: 0
|
||||||||||
| Marker | 文字列 | マーカー項目を指定します。 このパラメータは、MoveAction=0 または 3 の場合、無視されます。 |
//
// This JScript example creates several objects and then changes
// their child order using several of the ReorderSceneItem options.
//
NewScene(null, false);
GetPrim("Null");
NullMarker = GetPrim("Null");
GetPrim("Null");
GetPrim("Null");
NullToMove = GetPrim("Null");
// If you open the Explorer and change the "General Sort" option to "None (creation)"
// you'll see that we have null, null1, null2, null3, null4.
// Move "null4" after "null1".
ReorderSceneItem("Scene_Root", NullToMove, 2, NullMarker);
// Now make "null4" the first child.
ReorderSceneItem("Scene_Root", NullToMove, 0); |