0
$\begingroup$

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.

$\endgroup$
5
  • 2
    $\begingroup$ blender.stackexchange.com/a/129155/15543 $\endgroup$
    – batFINGER
    Commented Feb 25, 2020 at 1:59
  • $\begingroup$ @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 ? $\endgroup$
    – Noob Cat
    Commented Feb 25, 2020 at 3:04
  • 2
    $\begingroup$ Most likely blender.stackexchange.com/questions/7358/… If all materials are mesh linked then the material slot operators could be replaced. blender.stackexchange.com/questions/53366/… $\endgroup$
    – batFINGER
    Commented Feb 25, 2020 at 4:25
  • $\begingroup$ @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 $\endgroup$
    – Noob Cat
    Commented Feb 25, 2020 at 4:40
  • $\begingroup$ @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 $\endgroup$
    – Noob Cat
    Commented Feb 25, 2020 at 14:04

0

You must log in to answer this question.

Browse other questions tagged .