I'm trying to find a way to Select objects by UsedTexture bitmap.
I explain, I have thousands of .3ds files that I need to import in 3DSMAX and apply a specific sub-material keeping the used textures.
The .3ds files are not always the same, some have only one diffuse texture used, some have 3 or 4.
The .3ds files are made in a way as every face (triangle) has his own single material and one object=2 faces. (Wall, roof)
So if only 2 texures are used, if my .3ds is made of 40 faces, I will have 40 materials sharing 2 diffuse textures.
I'm looking for a way to select objects by the used diffuse textures in order to apply a MaterialID to this selection and create a unique sub-material with the number of ID=number of textures used.
The part of the script to create the sub-material is already done, I only have to find the way to select objects by their diffuse map texture.
Can anyone help me please?