Having textures affect both colour and alpha

I’m using the TEXFACE_UTILS script to make UV mapped textures renderable for multiple objects. I need to make a small addition so that textures affect both the alpha as well as colour. I have the line :
mat.setTexture(chanNumber, Tex, Texture.TexCo[“UV”],Texture.MapTo[“COL”])
which is fne, but I don’t know how to make it affect alpha at the same time ! If I do :
mat.setTexture(chanNumber, Tex, Texture.TexCo[“UV”],Texture.MapTo[“COL”] and Texture.MapTo[“ALPHA”])
then the texture only affects the alpha.


Use bitwise or:

mat.setTexture(chanNumber, Tex, Texture.TexCo["UV"], Texture.MapTo["COL"] | Texture.MapTo["ALPHA"])

Perfect. Thanks !