Is there an easy way to detect unused material slots in an object?
In the 3D Viewport, in Object Mode, with the object selected, pick Object &gt; Clean Up &gt; Remove Unused Material Slots.
This also works with multiple or all objects selected.