Returns or modifies a material's shine value.
rhinoscriptsyntax.MaterialShine (material_index, shine=None)
rhinoscript.material.MaterialShine (material_index, shine=None)
material_index |
Required. Number. The zero-based source material index. |
shine |
Optional. Number. The new shine value. A material's shine value ranges from 0.0 to 255.0, with 0.0 being matte and 255.0 being glossy. If omitted, the current shine value is returned. |
Number |
If shine is not specified, the current shine value if successful. |
Number |
If shine is specified, the previous shine value if successful. |
None |
It not successful, or on error. |
import rhinoscriptsyntax as rs
MAX_SHINE = 255.0
obj = rs.GetObject("Select object")
if obj:
index = rs.ObjectMaterialIndex(obj)
if index>-1:
rs.MaterialShine( index, MAX_SHINE/2 )