maxscript? consolidate materials with same name into one?

Hi all

This is possibly another job for maxscript, unless there is another way?

I have a bunch of materials (some in multisubobject). Some have same names but different material. Some is vray and some is standard. I need to find the 1st vray instance of a material, and then make all the others with same name the same as that one. IE instance the 1st one to the others, so that when I change the one, the rest change… err make sense?

:slight_smile:
and it gets more complicated. I want to scan to see which materials with different names are actually the same material, and then consolidate into 1 material

Hi Morne,
I made this script a long time ago it uses heuristics to determine if a material is the same (even with diferent names) a tries to consolidate them.

Best regards,
Daniel
RemoveDuplicateMats.txt (8.15 KB)

Thanks Daniel

How Do I use it?

Just run it or drag to the viewport (after changing from txt to ms). I think i removed the dependencies it has on other scripts, so there should be no errors. But if it gives a error just tell me i will try to correct. Also save before using it.

Best regards,
Daniel