Skip to main content
added 85 characters in body
Source Link
Amir
  • 3.1k
  • 3
  • 33
  • 58

If you want to do it inusing Blender's Python API you can executeuse the following. Just make sure you unlink the unwanted materials before doing this:

 toRemove = [block for block in bpy.data.materials if block.users == 0] for block in toRemove: bpy.data.materials.remove(block) 

If you want to do it in Python you can execute the following:

 toRemove = [block for block in bpy.data.materials if block.users == 0] for block in toRemove: bpy.data.materials.remove(block) 

If you want to do it using Blender's Python API you can use the following. Just make sure you unlink the unwanted materials before doing this:

 toRemove = [block for block in bpy.data.materials if block.users == 0] for block in toRemove: bpy.data.materials.remove(block) 
deleted 10 characters in body
Source Link
Amir
  • 3.1k
  • 3
  • 33
  • 58

If you want to do it in Python you can execute the following:

 toRemove = [block for block in self.bpy.data.materials if block.users == 0] for block in toRemove: self.bpy.data.materials.remove(block) 

If you want to do it in Python you can execute the following:

 toRemove = [block for block in self.bpy.data.materials if block.users == 0] for block in toRemove: self.bpy.data.materials.remove(block) 

If you want to do it in Python you can execute the following:

 toRemove = [block for block in bpy.data.materials if block.users == 0] for block in toRemove: bpy.data.materials.remove(block) 
Post Undeleted by Amir
Post Deleted by Amir
Source Link
Amir
  • 3.1k
  • 3
  • 33
  • 58

If you want to do it in Python you can execute the following:

 toRemove = [block for block in self.bpy.data.materials if block.users == 0] for block in toRemove: self.bpy.data.materials.remove(block)