Why does this work:
def TST():
objs=[obj for obj in rs.AllObjects() if rs.IsObjectSelectable(obj)]
for obj in objs:
rs.HideObject(obj)
But this doesn’t:
def TST1():
for l in sc.doc.Layers:
objs = rs.ObjectsByLayer(l.Name)
for obj in objs:
#print obj
rs.HideObject(obj)