How to delete multiple materials?

I know I can “Shift-click” on that “x” (Unlink Datablock) button next to the name of the material to remove it permanently from the .blend file. But what if you had over 50 materials? That could be long/tedious/cumbersome/non-practicle/etc

Thanks guys,

JDL

your needs to learn python are becoming more apparent! :wink:


import bpy

MatList=['PUT', 'THE', 'NAMES', 'OF', 'ALL', 'MATERIALS', 'TO', 'CLEAN', 'HERE']

for Mat in MatList:
    bpy.data.materials[Mat].user_clear()

they will be removed as soon as you reopen the file.
:wink:

Excellent! This is so kind of you Secrop :slight_smile:
I’ll consider getting a mob app to learn python…