LightDirection

Returns or changes the direction of a light object. This function can be used to return or modify the target of spotlights.

Syntax

rhinoscriptsyntax.LightDirection (object_id, direction=None)

rhinoscript.light.LightDirection (object_id, direction=None)

Parameters

object_id

Required.  String or Guid.  The light object's identifier.

direction

Optional.  List of 3 numbers or Vector3d.  The new end point, or direction.  If omitted, the direction point is returned.

Returns

Vector3d

If a direction point is not specified,  the current direction if successful.

Vector3d

If a direction point is specified, the previous direction point if successful.

Example

import rhinoscriptsyntax as rs

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

if id: rs.AddPoint( rs.LightDirection(id) )

Also See

IsLight

LightLocation