Select by Textures

Is there a way to select objects by the textures they use? I downloaded a model that has multiple objects with the same textures, but they take up different material slots for each object. Its a very large model split into a lot of objects and I don’t want to go through each and every one of them, join them together, and assign them to one material, so It would be nice there is a way to automatically select them based on the texture they use.

This is a VERY good question which I have also faced issues with. Turns out this is really hard to do for some reason! Even in Python, it’s not easy because the “users” property only gives you the number of users, not the actual list of users. And the object itself is not technically the user of the texture. The object is the user of the mesh, which is the user of the material, which is the user of the texture/image! It’s a web of confusion!

The easiest thing would be to use the python console to print a list of materials which use that texture, then use THAT list to make a list of meshes that use those materials, THEN use that list… you get the idea.

If you want to go down this path I will help you. But if you just want to do it manually, then let me assure you you’re not dumb for doing it that way either. If there is an easy way I haven’t learned it yet.

But here’s something you’ll find hilarious: this was really easy back in version 2.3x. History doesn’t always go in a straight line…

I’ll try using the console for this. I’m learning Python in school right now, so I hope some stuff will transfer over and make this a bit easier for me.

That’s great! Blender is, in my opinion, the best way to learn python because your scripts can do something useful instead of add three numbers together or whatever they teach in school these days. Good luck!

You might find this useful…

I’m looking for a way to select objects by the textures they use, not the material. This addon would allow me to merge objects that have duplicated materials, but in my file some of the objects have the same base name, but still have different textures assigned to them.

Annotation 2020-03-27 071439