X3DObject.AddChild

説明

X3DObject子オブジェクトのコレクションまたは単一のX3DObject子オブジェクトをこの 3d オブジェクトの下に関連付けます。X3DObjectオブジェクトから子オブジェクトを移動する際には、通常AddChildが使用されます。

スクリプト 構文

X3DObject.AddChild( [Items] );

パラメータ

パラメータ タイプ 詳細
Items X3DObjectCollectionまたはX3DObject X3DObjectCollectionまたは単一のX3DObject

VBScript の例

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