I am guessing you want to improve performance/see stuff with flat materials?
go to the display panel and change the radiobuttons, you can view meshes colored by material of by object (wire) colour. It might be enough for you. A script is certainlypossible otherwise, but a clearer brief would be useful to know exactly what you want to achieve.
Offline
, polycounter, 776 Posts, Join Date Jan 2006, Location UK