0

How can I fix this via script? In this case the materials are all in use on an object, but they are the same material on multiple face, I would like to simplify it in 1 material only:

enter image description here

Edit:

in order not to make this question a possible duplicate, I want to specify that in this case I would like to iterate all the objects in the scene, and look for possible duplicate slots.

Noob Cat
  • 1,222
  • 3
  • 20
  • 61
  • 2
    https://blender.stackexchange.com/a/129155/15543 – batFINGER Feb 25 '20 at 01:59
  • @batFINGER I tried your script on a single object it works very well, but under a for loop or in C.scene.object, it seems to be very slow, a scene of about 250 objects, we are almost 20 minutes waiting, what do you think happens ? – Noob Cat Feb 25 '20 at 03:04
  • 2
    Most likely https://blender.stackexchange.com/questions/7358/python-performance-with-blender-operators If all materials are mesh linked then the material slot operators could be replaced. https://blender.stackexchange.com/questions/53366/how-can-i-replace-a-material-from-python – batFINGER Feb 25 '20 at 04:25
  • @batFINGER Ty for usefull info,I added the detail concerning all the objects in the scene in the question, in order to be more specific – Noob Cat Feb 25 '20 at 04:40
  • @batFINGER Your script works well, just add the active object in the scene to each for loop, so it will work perfectly under a for loop – Noob Cat Feb 25 '20 at 14:04

0 Answers0