def light_surfaces(onoff): import chimera, _surface mlist = chimera.openModels.list(modelTypes = [_surface.Surface_Model]) for m in mlist: for g in m.surface_groups(): g.set_use_lighting(onoff) light_surfaces(False)