X3DObject.AddChild

Description

Parents a collection of X3DObject child objects or a single X3DObject child object under this 3D object. AddChild is typically used for moving child objects from other X3DObject objects.

C# Syntax

X3DObject.AddChild( Object in_collection );

Scripting Syntax

X3DObject.AddChild( [Items] );

Parameters

Parameter Type Description
Items X3DObjectCollection or X3DObject An X3DObjectCollection or a single X3DObject

Examples

VBScript Example

NewScene , false
set oRoot = Application.ActiveProject.ActiveScene.Root
set oChildren = oRoot.Children
set oObj = oRoot.AddGeometry( "Cone","MeshSurface" )
oObj.AddChild oChildren
for each oChild in oObj.Children
	Application.LogMessage oChild.Name & ", " & TypeName(oChild)
next
' Expected results:
'INFO : Camera_Root, CameraRig
'INFO : light, Light