Quick way to remove thousands of materials from an object? I've put in about 3 days of work manually editing a mesh (with lots of copying and pasting) to get around the issues of junk vertices with boolean operations in Blender and noticed something troubling.  I started with a single material but after all the edits that single material has multiplied into approximately 20,000 duplicates of the same material, all assigned to separate parts of the same mesh.  I've been clicking away at the - button for awhile and am only up to ~700 deleted materials - is there a way to clear all materials from an object then simply reapply the one I want?
This method takes time under one second if you have 20k materials object.
Select first your multimaterial object then object which has one material.
Click in material panel black arrow > "Copy material to Others".