Eliminate duplicate materials .001 .002 .003 after Append

(RickyBlender) #21

how do you run this script?
is this added as an operator and where ?

will try to understand it but not easy!

happy bl

(vitorbalbio) #22
(RickyBlender) #23

what did you change ?
is it for 2.8 ?

i’m on 2.79 for now
but would definitively like to get it for 2.8
very useful function to clean up mat

I run script from the text editor
but cannot find the operator name in object menu bottom header
where is it ?

happy bl

(RickyBlender) #24

found it ta top of object menu !

here is sample file with multiple mat on a motor
with many mat like bumpy bumpy.xyz
it seems to change the name of all bumpy mat but does not
re assign face to the base mat !

will PM you file
would like to keep model private if possible

happy bl

(vitorbalbio) #25

Hi RickyBlender
This updated version is been maintained by brickmack not by me anymore. Please contact he in github.

(dpdp) #26

Ricky, I think my addon is exactly what you’re looking for. Pick the material slot in your object materials that is the one you like. For example, it could be Mat.004 in the list Mat, Mat.001, Mat.002, etc. Then select the Material Specials menu > Clean Cad Mats and it will update all materials in all objects that use a material with the prefix Mat to the currently selected slot. It could be assigned to individual faces or the full object. It doesn’t matter.

I made this for imported cad objects. I would import an file with hundreds of bolts each with a different material. So I could have bolt_material.001 through bolt_material.965. I would find a bolt and modify the material, but then I’d have to change the material for the other 964 bolts. This lets you modify one instance of the bolt_material and then it goes through all of the objects in the scene and replaces any instance of the bolt_material with the one you just modified. The number of vertices has no effect on performance.

Edit: I’ve updated it to work with 2.80 as well.

1 Like
Blender 2.8: Remove duplicated Materials