Returns or modifies a material's reflective color. Reflective 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.
rhinoscriptsyntax.MaterialReflectiveColor (material_index, color=None)
rhinoscript.material.MaterialReflectiveColor (material_index, color=None)
material_index |
Required. Number. The zero-based source material index. |
color |
Optional. Number. The new color value. If omitted, the current reflective color is returned. |
Number |
If color is not specified, the current reflective color if successful. |
Number |
If color is specified, the previous reflective color if successful. |
None |
It not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object")
if obj:
index = rs.ObjectMaterialIndex(obj)
if index>-1:
rs.MaterialReflectiveColor( index, (191, 191, 255) )