Skip to main content
1 of 2
Michael Teiniker
  • 1.1k
  • 1
  • 13
  • 26

Removing all material slots in one go

I need some help in removing all material slots in one go using a python script. I am able to use this, would prefer to ave all removed.

bpy.context.object.active_material_index = 0 bpy.ops.object.material_slot_remove() bpy.context.object.active_material_index = 1 bpy.ops.object.material_slot_remove() bpy.context.object.active_material_index = 2 bpy.ops.object.material_slot_remove()

Michael Teiniker
  • 1.1k
  • 1
  • 13
  • 26