GetBrushTexure

Blitz3D Forums/Blitz3D Programming/GetBrushTexure

jfk EO-11110(Posted 2005) [#1]
I have a problem with GetBrushTexture

I have written a CloneMesh function to be able to alter the entity properties of a loaded B3D Mesh. However, when I check for the texture that is used on the second texturecoordinate set (index 1) of a brush with only one texture, then I won't get zero as expected, but a handle that looks like a textue handle. First I simply used to set both UV Coordinates for the vertices, set 0 and 1, no matter how many textures a brush has, but it turned out the mesh will become invisible when there is NO second texture. So I need to make sure there are only as many UV Sets as textures in the brush.

How can I determine if the second texture of a brush is a valid handle?