Click or drag to resize

MaterialTable Class

[Missing <summary> documentation for "T:Rhino.DocObjects.Tables.MaterialTable"]

Inheritance Hierarchy
SystemObject
  Rhino.DocObjects.TablesMaterialTable

Namespace:  Rhino.DocObjects.Tables
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public sealed class MaterialTable : IEnumerable<Material>, 
	IEnumerable

The MaterialTable type exposes the following members.

Properties
  NameDescription
Public propertyComponentType (Overrides CommonComponentTableTComponentType.)
Public propertyCount
Returns number of materials in the material table, including deleted materials.


In Rhino for Windows 6.5, this member is inherited from CommonComponentTableTCount.
Public propertyCurrentMaterialIndex
At all times, there is a "current" material. Unless otherwise specified, new objects are assigned to the current material. The current material is never locked, hidden, or deleted.
Public propertyCurrentMaterialSource
Gets or sets the current material source.
Public propertyDocument
Document that owns this table.


In Rhino for Windows 6.5, this member is inherited from RhinoDocCommonTableTDocument.
Public propertyItem
Conceptually, the material table is an array of materials. The operator[] can be used to get individual materials. A material is either active or deleted and this state is reported by Material.IsDeleted.
Top
Methods
  NameDescription
Public methodAdd
Adds a new material to the table based on the default material.
Public methodAdd(Material)
Adds a new material to the table based on a given material.
Public methodAdd(Material, Boolean)
Adds a new material to the table based on a given material.
Public methodClear
Marks all items as deleted.
(Inherited from CommonComponentTableT.)
Public methodDelete (Overrides CommonComponentTableTDelete(T).)
Public methodDeleteAt
Removes a material at a specific position from this material table.
Public methodEquals (Inherited from Object.)
Public methodFind(Guid, Boolean)
Finds a material with a matching id.
Public methodFind(String, Boolean)
Finds a meterial with a given name.
Public methodFindId
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/openning operations. This function will not find grip objects.
(Inherited from CommonComponentTableT.)
Public methodFindIndex
Retrieves a Material object based on Index. This seach type of search is discouraged. We are moving towards using only IDs for all tables.
Public methodGetEnumerator

In Rhino for Windows 6.5, this member is inherited from CommonComponentTableTGetEnumerator.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodModify
Modify material settings.
Public methodResetMaterial
Public methodToString (Inherited from Object.)
Top
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.5
See Also