Returns or modifies the user-definable name of a light object.
rhinoscriptsyntax.LightName (object_id, name=None)
rhinoscript.light.LightName (object_id, name=None)
object_id |
Required. String or Guid. The identifier of the light object. |
name |
Optional. String. The new light name. If omitted, the current light name is returned. |
String |
If name is not specified, the current light name if successful. |
String |
If name is specified, the previous light name if successful. |
import rhinoscriptsyntax as rs
id = rs.GetObject("Select a light", rs.filter.light)
if id:
name = rs.GetString("New light name")
if name: rs.LightName(id, name)