Script for making every material one material per one object I need some help with making a python script.
Anybody know how to automatically duplicate any material that's linked to multiple objects
so that there is one material for every object?
For example,

Here you see Material231 linked to two objects; Cone and Cube. I would like to develope a script which duplicates/makes a new material based on Material231 and automatically links it to other objects.
Any help is appreciated.
Thank you!
Thankfully it’s very easy. The material datatype has a method copy() which returns a new duplicate material.
Something like this:
for o in bpy.context.selected_objects:
    o.data.materials[0]=o.data.materials[0].copy()

This code assumes the material is linked to the mesh data block.