v5.0
Removes all transform groups specified in the input list. Children of the transform group are reparented under the parent of the transform group. The global positions of the children remain unchanged when the transform group is removed.
RemoveTransformGroup( [InputObjs] ); |
Parameter | Type | Description |
---|---|---|
InputObjs | String |
List of transform groups to remove. Default Value: Selected objects |
/* 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 ); |