Counting Brush Textures?

Blitz3D Forums/Blitz3D Programming/Counting Brush Textures?

Sorry, was AFK for a while.

No, you don't need to create a clone.

If you're working on the mesh level (not animesh) than you have to track down the textures this way:

Get the surfaces one by one.
Get each surfaces brush
Get each brushes testureS
If you want get each textures file path.


The SaveB3D example in the archives /mesh stuff shows clearly how to determine the used textures.

In your case you will also do a "repeat until texture handle returns zero" check to determine potential multiple textures of a brush.

The commands GetBrushTexture and GetSurfaceBrush will create a clone brush and texture for some reason, so you need to free them after usage. No Mesh clone.