When I use the script it Ungroups the grouped objects and deletes all Usertexts? Is this a bug?
def ChangeMaterial(matIndex, ObjectID):
attr = Rhino.DocObjects.ObjectAttributes()
attr.MaterialIndex = matIndex
attr.MaterialSource = Rhino.DocObjects.ObjectMaterialSource.MaterialFromObject
attrChange = scriptcontext.doc.Objects.ModifyAttributes(ObjectID, attr, True)
scriptcontext.doc.Views.Redraw();
2 posts - 2 participants