Properties

ComponentType

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

Count

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

DefaultLight

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

Document

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

Skylight

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

Sun

#Since v5.0
Gets the Sun instance that is applied to the document.

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

public Sun Sun { get; }
RdkNotLoadedExceptionIf the RDK is not loaded.

Indexers

this[]

#
public LightObject this[
index
] { get; }

Methods

Add

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

Add

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

Clear

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

Delete

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

Delete

#Since v6.0
public override bool Delete()

Find

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

FindId

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.
public virtual T FindId(
id
ID of model component to search for.
)
inherited fromCommonComponentTable<T>
Reference to the rhino object with the objectId or null if no such object could be found.
FindId

FindIndex

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

FindName

#Since v6.0
Finds the LightObject with a given name.

Deleted lights have no name.

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

FindNameHash

#Since v6.0
Finds a LightObject given its name hash.
public LightObject FindNameHash(
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(
id,
Light
light
)

Modify

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

Undelete

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