How I can write the Layer name of the objects as a Value of the Key “Material” in the Attributes User Text of the objects?
I do found this piece of code that works but i don’t know how I can get the Layer Name and pass-it into the “Layer_name” value of the script.
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object")
if obj:
rs.SetUserText( obj, "Material", "Layer_name" )
P.S. Also I do want to modify this script to accept preselected objects. Best regards.
4 posts - 2 participants