Hey guys,
I have an issue here with imported meshes from another software package. For each imported object a new material is created however it references the same bitmap.
As this are hundreds it's quite nasty to reassign them.
So is there a way to do a little script where I can say. "Look for texture file "Enter-A-NAME.extension" in the dissuse color channel and select all objects which do reference this at once?
Search must rely on the bitmap name as materials and bitmap "name" are not equal 😞
I am a graphic nerd but weak in programming. You would save me hours of lifetime.
Regards
Matthias
Solved! Go to Solution.
Solved by Swordslayer. Go to Solution.
There's one important information missing, what kind of material is that? The following would work for a standard material:
filename = @"C:\Path\image.jpg" select (for obj in objects where isKindOf obj.mat standardMaterial and isKindOf obj.mat.diffuseMap bitmapTexture and obj.mat.diffuseMap.filename == filename collect obj)
Awesome! Yes for standard materials. You saved me a lot of my lifetime ;). Thanks man!
Regards Matthias