Auto select Image Alpha as source....32bit

I've got several scenes utilising a shared texture (TGA) database and over a period of time (years) some of the textures have been updated from 24bit TGA's to 32bit versions. This gives me a problem in that I need to manually find and tick/select the material (diffuse slot only) to use the image alpha as the image source within every scene/model and instance the texture in question is used and due to the size of the scenes and large number of textures used, it's easy to miss one or two. So I'm after a quick and easy way of ticking/selecting image alpha as the source if the loaded texture is 32bit i.e. has an image source. Can anybody point me at an existing script that might do this or create one for me?
Thanks in advance.
Andy

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pixamoon's picture

`

hi, try this one:

for o in getclassinstances bitmaptexture do try(
	info = getbitmapinfo o.bitmap
	if info[5] > 30 do o.alphaSource = 0		
)catch()

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.