Click or drag to resize

GH_Material Class

Represents a implementation of the Rhino material
Inheritance Hierarchy
SystemObject
  Grasshopper.Kernel.TypesGH_GooDisplayMaterial
    Grasshopper.Kernel.TypesGH_Material

Namespace:  Grasshopper.Kernel.Types
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public class GH_Material : GH_Goo<DisplayMaterial>

The GH_Material type exposes the following members.

Constructors
  NameDescription
Public methodGH_Material
Initializes a new instance of the GH_Material class
Public methodGH_Material(Color)
Create a new material based on a colour. The colour is used to control Diffuse, Emission and Transparency. Ambient, Specular and Shine are always default.
Public methodGH_Material(DisplayMaterial)
Create a new Material.
Public methodGH_Material(GH_Material)
Copy another GH_Material instance.
Public methodGH_Material(Guid)
Create a new Material from an RDK material ID.
Public methodGH_Material(RenderMaterial)
Create a new Material.
Public methodGH_Material(String)
Create a new Material from an RDK xml string.
Top
Properties
  NameDescription
Public propertyIsValid (Overrides GH_GooTIsValid.)
Public propertyIsValidWhyNot
Gets a string describing the state of "invalidness". If the instance is valid, then this property should return Nothing or String.Empty.
(Overrides GH_GooTIsValidWhyNot.)
Public propertyRdkMaterialId
Gets or sets the RDK material ID this material is associated with.
Public propertyRdkMaterialRmtl
Gets or sets the RDK material RMTL file path.
Public propertyRdkMaterialXml
Gets or sets the RDK material Xml string.
Public propertyType
Gets the implied type based on what fields have been assigned.
Public propertyTypeDescription (Overrides GH_GooTTypeDescription.)
Public propertyTypeName (Overrides GH_GooTTypeName.)
Public propertyValue
Gets or sets the internal data.
(Inherited from GH_GooT.)
Top
Methods
  NameDescription
Public methodCastFrom (Overrides GH_GooTCastFrom(Object).)
Public methodCastToQ(Q)
Attempt a cast to type Q.
(Inherited from GH_GooT.)
Public methodCastToT(T) (Overrides GH_GooTCastToQ(Q).)
Public methodStatic memberCreateRhinoMaterial
Creates a standard Rhino material from a colour.
Public methodStatic memberCreateStandardMaterial
Creates a standard Grasshopper material from a colour.
Public methodDuplicate
Duplicate this material.
(Overrides GH_GooTDuplicate.)
Public methodDuplicateMaterial
Duplicate this material.
Public methodEmitProxy (Overrides GH_GooTEmitProxy.)
Public methodMaterialBestGuess
Gets the best guess RenderMaterial for this shader.
Public methodRead (Overrides GH_GooTRead(GH_IReader).)
Public methodScriptVariable (Overrides GH_GooTScriptVariable.)
Public methodToString (Overrides GH_GooTToString.)
Public methodWrite (Overrides GH_GooTWrite(GH_IWriter).)
Top
Fields
See Also