Description
Resets the object’s print color to its layer value. This is useful to reset objects that has been edited using the MakeBlue, MakeGray, MakeGreen, MakeRed or MakeYellow scripts.
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)
rs.ObjectColorSource(id,0)
rs.ObjectPrintColorSource(id,0)
if( __name__ == "__main__" ):
MaterialColorToObject()