Remove duplicate materials with different names

I have created a script that imports a bunch of .obj files, but in doing so it creates new materials for each one. Some of these material have the same name with the same texture, but some have the same name and different textures. I have looked online for solutions, but all the ones I could find removed them based on name, which raises some false positives and removes materials that aren’t duplicates. Any insight on how I could fix this?

Welcome :tada:

You may tell what you have found so far and what you experiences are. Also since your title seems to ask for some different than what you wrote.

Also: there are already some thread discussion this… for example:

or

( Hint: top right: :mag: --icon … :wink: )

I figured out a way to do it on my own. First I found all objects that used the same textures, then used ctrl+L to link the materials. After that, I viewed the unused data and purged it. I didn’t see those threads when looking for it, but they look like they might also work.

1 Like