Creates a new Light object given a light preset name/object. An interest is
also created by default unless its specified otherwise with the AddInterest argument. The new
light created is parented under this X3DObject.
This method only creates a Ligh object with possibly an interest, whereas
X3DObject.AddLightRig creates a Light root object with the Light and its
interest as children.
Light X3DObject.AddLight( Object in_Preset, Boolean in_bAddInterest, String in_name ); |
oReturn = X3DObject.AddLight( Preset, [AddInterest], [Name] ); |
Parameter | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Preset | Light Primitive Preset |
Preset for type of light
|
||||||||||||||||||||
AddInterest | Boolean |
Add an interest to the created Light. This argument can be set to True for creating a spot light object. Default Value: True |
||||||||||||||||||||
Name | String | name of new Light |
set oRoot = Application.ActiveProject.ActiveScene.Root set oSpot = oRoot.AddLight( "Spot", True ,"MySpotLight" ) |