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.
Rhino.MaterialsByColor (lngColor)
strMaterial |
Required. Number. The color value to match. |
Array |
An array of material indices if successful. |
Null |
If not successful, or on error. |
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