Description
Creates a primitive light.
Note: This command uses output arguments. C# and some scripting languages (such as JScript, PerlScript and Python) don't support arguments passed by reference. Normally you can get the output arguments via either XSIApplication.ExecuteCommand method (C#) or the ISIVTCollection (scripting languages), but this command already returns a value.
The only available workaround in this case is to create a VBScript custom command which returns both the output arguments and the return value in one array. For details, see What Happens when the Function Already Returns a Value?.
Scripting Syntax
GetPrimLight( PresetObj, [Name], [Parent], [Primitive], [PrimObjSpot], [PrimObjSpotInterest] )
Parameters
|
Parameter |
Type |
Description |
|
PresetObj [in/out] |
String or a preset object (see SIGetPreset) |
Any preset for the Light Primitives |
|
Name |
Name of the light. |
|
|
Parent |
Parent object for the light. |
|
|
Primitive [out] |
Returns the light primitive. |
|
|
PrimObjSpot [out] |
Returns the spot light object. For other light types, this is the light object (the same object returned by GetPrimLight). |
|
|
PrimObjSpotInterest [out] |
Returns the spot interest for the Spot and Light_Box types of lights (and Nothing for the other light types). |
Return Value
Returns the LightRig object for the Spot and Light_Box and the Light object for the other light types.
Examples
VBScript Example
GetPrimLight "Neon", "MyNeonLight" set root = GetPrimLight( "Spot", "aSpot", , spot, prim, interest ) logmessage "root = " & root logmessage "prim = " & prim logmessage "spot = " & spot if Not TypeName (interest) = "Nothing" then logmessage "int = " & interest end if
See Also
Autodesk Softimage v7.5