Properties

ComponentType

#Since v6.0
public override ModelComponentType ComponentType { get; }

Count

#Since v5.0
public override int Count { get; }
Number of lights in the light table. Does not include Sun or Skylight.

DefaultLight

#Since v9.0
public LightObject DefaultLight { get; }
Gets the default light that Rhino uses when no other lights illuminate the scene.

Document

#Since v5.0
public RhinoDoc Document { get; }
Document that owns this light table.

Skylight

#Since v6.0
public Skylight Skylight { get; }

Sun

#Since v5.0
public Sun Sun { get; }
Gets the Sun instance that is applied to the document.

If the RDK is loaded, an instance is always returned.

RdkNotLoadedExceptionIf the RDK is not loaded.

Indexers

this[]

#
public LightObject this[int index] { get; }
index (int)

Methods

Add

#Since v5.0
public int Add(Light light, ObjectAttributes attributes)
light (Light)
attributes (ObjectAttributes)

Add

#Since v5.0
public int Add(Light light)
light (Light)

Clear

public void Clear()
Marks all items as deleted.
inherited fromCommonComponentTable<T>

Delete

#Since v6.0
public bool Delete(int index, bool quiet)
index (int)
quiet (bool)

Delete

#Since v6.0
public override bool Delete(LightObject item)
item (LightObject)

Find

#Since v5.0
public int Find(Guid id, bool ignoreDeleted)
id (Guid)
ignoreDeleted (bool)

FindId

public virtual T FindId(Guid id)
Uses the guid to find a model component. Deleted objects cannot be found by id. The guid is the value that is stored in the .Id property. In a single document, no two active objects have the same guid. If an object is replaced with a new object, then the guid persists. For example, if the _Move command moves an object, then the moved object inherits its guid from the starting object. If the Copy command copies an object, then the copy gets a new guid. This guid persists through file saving/opening operations. This function will not find grip objects.
inherited fromCommonComponentTable<T>
id (Guid)ID of model component to search for.
Reference to the rhino object with the objectId or null if no such object could be found.
FindId

FindIndex

#Since v6.0
public LightObject FindIndex(int index)
Retrieves a object based on Index. This search type of search is discouraged. We are moving towards using only IDs for all tables.
index (int)The index to search for.
A object, or null if none was found.

FindName

#Since v6.0
public LightObject FindName(string name)
Finds the LightObject with a given name.

Deleted lights have no name.

name (string)Name to search.
A layer. If no layer is found, null is returned.

FindNameHash

#Since v6.0
public LightObject FindNameHash(NameHash nameHash)
Finds a LightObject given its name hash.
nameHash (NameHash)The name hash of the LightObject to be searched.
A LightObject, or null on error.

GetEnumerator

#Since v5.0
public override IEnumerator<LightObject> GetEnumerator()

Modify

#ExampleSince v5.0
public bool Modify(Guid id, Light light)
id (Guid)
light (Light)

Modify

#Since v5.0
public bool Modify(int index, Light light)
index (int)
light (Light)

Undelete

#Since v8.8
public bool Undelete(int index)
Restores a light that has been deleted.
index (int)A light index to be undeleted.
true if successful.