RemoveTransformGroup

導入

v5.0

詳細

入力リストに指定されている転送グループをすべて削除します。 転送グループの子は、その転送グループの親の子になります。 転送グループを削除しても子のグローバル位置は変更されません。

スクリプト構文

RemoveTransformGroup( [InputObjs] );

パラメータ

パラメータ タイプ 説明
InputObjs 文字列 削除する転送グループのリスト

デフォルト値: 選択されたオブジェクト

JScript の例

/*

	This example will transform group a cone twice, making a hierarchy 3 objects deep. 

	Each object will be offset by 5 units in Y. Then the transform groups will both be 

	removed using RemoveTransformGroup Note the cone's position remains unchanged when 

	removing the groups.

*/

// Make transform groups visible in the camera view

SetValue("Camera.camvis.objctrltransfogroups", true, null);

// Create and position the cone

var oCone = CreatePrim("Cone", "MeshSurface");

var pos = XSIMath.CreateVector3();

pos.Set(0,5,0);

oCone.LocalTranslation = pos;

// Transform group the cone and offset the group 5 units in Y

var oXfmGroup  = CreateTransformGroup(null, "cone");

oXfmGroup.LocalTranslation = pos;

var oXfmGroup2 = CreateTransformGroup(null, "cone");

oXfmGroup2.LocalTranslation = pos;

var oGroupColl = new ActiveXObject("XSI.Collection");

oGroupColl.Add(oXfmGroup);

oGroupColl.Add(oXfmGroup2);

RemoveTransformGroup( oGroupColl );

関連項目

CreateTransformGroup