Light object

The Light object stores settings that control how objects are lit when the renderStyle is set to SHADED.

The Light object has no constructor; Abaqus creates them as part of the defaultLightOptions and the lightOptions objects when a session is started.

The following topics are discussed:

Access

session.defaultLightOptions.lights[i]
session.viewports[name].lightOptions.lights[i]

setValues(...)

This method modifies the Light object.

Required arguments

None.

Optional arguments

enabled

A Boolean specifying whether the light is on or off. The default value is OFF.

type

A SymbolicConstant specifying how the effect of the light should be calculated. Possible values are:

  • DIRECTIONAL, specifying a constant vector should be used for the direction from the light to a vertex.

  • POINT, specifying the vector from the light to each vertex should be calculated.

The default value is DIRECTIONAL.

When set to type =DIRECTIONAL, a constant vector is used for the direction from the light to a vertex. When type =POINT, the result is more realistic because the actual vector from the light to each vertex is calculated. However, overall performance is decreased.

latitude

A Float specifying the altitude of the light above or below the camera. Possible values are -90.0  latitude   90.0. The default value is 0.0.

longitude

A Float specifying the east/west position of the light to the left or right of the camera. Possible values are -90.0  longitude   90.0. The default value is 0.0.

diffuseColor

A String specifying the color of the light added to the scene by this light source. The initial value is 70% gray. A list of valid color strings is in the colors map in the session object.

specularColor

A String specifying the color of the specular highlights created by this light source. The initial value is 36% gray. A list of valid color strings is in the colors map in the session object.

Return value

None.

Exceptions

RangeError.

Members

The Light object has members with the same names and descriptions as the arguments to the setValues method.