Description

Sets the selected object’s display color to RGB(32,94,166), and print color to ‘Display color’.

See also

Author and license

Script by MLAV.LAND, licensed under the GNU GPL 3 License.

Code

import rhinoscriptsyntax as rs
 
def MaterialColorToObject():
    ids = rs.GetObjects("Select objects",preselect=True)
    if not ids:return
    
    for id in ids:
        rs.EnableRedraw(False)
        color = rs.CreateColor(32, 94, 166)
        rs.ObjectPrintColor(id,color)  
        
if( __name__ == "__main__" ):
    MaterialColorToObject()