AddLight (X3DObject)
Description
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.
Scripting Syntax
X3DObject.AddLight( Preset, [AddInterest], [Name] )
C# Syntax
Light X3DObject.AddLight( Object in_Preset, Boolean in_bAddInterest, String in_name );
Parameters
|
Parameter |
Type |
Description |
|
Preset |
Light Primitive Preset |
Preset for type of light Possible Values: • Infinite: Infinite light • Light_Box: Light Box light • LightInfinite: Infinite light • LightPoint: Point light • LightSpot: Spotlight • LightSun: Sunlight • Neon: Neon light • Point: Point light • Spot: Spotlight |
|
AddInterest |
Add an interest to the created Light. This argument can be set to True for creating a spot light object. Default Value: True |
|
|
Name |
name of new Light |
Return Value
Examples
VBScript Example
set oRoot = Application.ActiveProject.ActiveScene.Root set oSpot = oRoot.AddLight( "Spot", True ,"MySpotLight" )
SOFTIMAGE|XSI v6.01