MaterialsByColor

Returns the indices of all materials of a specified diffuse color.  Diffuse colors are represented as RGB colors.  An RGB color specifies the relative intensity of red, green, and blue to cause a specific color to be displayed.

Syntax

Rhino.MaterialsByColor (lngColor)

Parameters

strMaterial

Required.  Number.  The color value to match.

Returns

Array

An array of material indices if successful.

Null

If not successful, or on error.

Example

Dim lngColor, arrMaterials, i

lngColor = Rhino.GetColor

If IsNumeric(lngColor) Then

  arrMaterials = Rhino.MaterialsByColor(lngColor)

  If IsArray(arrMaterials) Then

    For i = 0 to UBound(arrMaterials)

      Rhino.Print i

    Next

  End If

End If

Also See

MaterialsByName