Skip to content

pytha.set_element_face_light

fabian-flassig edited this page May 21, 2026 · 1 revision

Assigns a face light source to a single part or a table of parts. The part's faces emit light, similar to the Lights -> Face Light function in the PYTHA user interface.

If a part is already a face light, its existing settings are reused as the baseline and only the fields given in options are overwritten. For parts that are not yet a face light, sensible defaults are used as the baseline (intensity 1000, white color, shadows on, state on).

pytha.set_element_face_light(element [,options])
Parameter Type Description
element element_handle or {...} A single element handle or a table of element handles
options {...} Optional: a table that may contain the following options:
options.cast_shadow boolean Whether this light casts shadows
options.color_srgb {r,g,b} Light color as sRGB, each component in [0,1]
options.color_temperature number Color temperature in Kelvin. 0 means no color temperature is applied (the color_srgb value is used instead)
options.intensity number Light intensity, >= 0
options.state boolean true switches the light on, false off

Version Support:

Minimum PYTHA Version: V26

See also:

pytha, element handles, create_point_light_source

Clone this wiki locally