3
$\begingroup$

I have recently been importing and modifying models from sites such as CGTrader. When I work on the materials for models, it often seems that objects have unused material slots.

At the moment, I'm just going into Edit mode, clicking the "Select" button for each slot, then scouring the object to see if any faces are selected, before deleting the slot if it is unused.

However, it seems there should be a more efficient way of doing this. Can anyone enlighten me please?

$\endgroup$
3
  • 1
    $\begingroup$ For a python way you may want to consider BSE How to remove all unused material slots from all objects? $\endgroup$
    – Ratt
    Apr 13 '21 at 3:09
  • 3
    $\begingroup$ On the right of the material list, there's a dropdown menu > Remove Unused Slots $\endgroup$
    – moonboots
    Apr 13 '21 at 6:01
  • $\begingroup$ Isn't python a bit overkill for this simple task? Just hit A in the viewport to select all objects and use the Clean Up > Remove Unused Material Slots function like the answer suggests. $\endgroup$ Apr 13 '21 at 8:53
8
$\begingroup$

In the 3D Viewport, in Object Mode, with the object selected, pick Object > Clean Up > Remove Unused Material Slots.

This also works with multiple or all objects selected.

$\endgroup$
3
  • $\begingroup$ Thanks @Gordon Brinkmann - that's exactly what I needed. $\endgroup$ Apr 13 '21 at 13:53
  • $\begingroup$ I just added the last sentence for completion, @scurest gave the answer ;) $\endgroup$ Apr 13 '21 at 13:58
  • $\begingroup$ Well thank you both ;-) $\endgroup$ Apr 13 '21 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.