EnableLight

Enables or disables a light object.

Syntax

rhinoscriptsyntax.EnableLight (object_id, enable=None)

rhinoscript.light.EnableLight (object_id, enable=None)

Parameters

object_id

Required.  String or Guid.  The identifier of the light object

enable

Optional.  Boolean.  The light's enabled status.

Returns

Boolean

If enable is not specified, then the current enabled status if successful.

Boolean

If enable is specified, then the previous enabled status if successful.

Example

import rhinoscriptsyntax as rs

id = rs.GetObject("Select light", rs.filter.light)

if id: rs.EnableLight( id, False )

Also See

IsLight

IsLightEnabled

LightColor

LightCount

LightName

LightObjects