@soccerbatman wrote:
Hi everyone, I have been trying to make a script that materials names match their layers names. Here is what I have and it does not work:
import rhinoscriptsyntax as rs
def LayerNameToMaterial():
layers = rs.LayerNames()for i in layers: objs = rs.ObjectsByLayer(i) index = rs.ObjectMaterialIndex(objs) if index==0: rs.MaterialName(objs, i)
LayerNameToMaterial()
Posts: 1
Participants: 1