getbrushtexture from uv channel 1

Blitz3D Forums/Blitz3D Programming/getbrushtexture from uv channel 1

Dannyk(Posted 2012) [#1]
Hi, Probably really obvious when you know how but i dont so...
I am loading a b3d exported via 3ds max pipeline and i am trying to get the name of the textures loaded on each child (so i can automatically apply shaders based on the name of the texture), works great except for entitys that have a multi/subobject applied, all i can get is the texture from the first set of coords 0 (default) but i also need to get the texture(s) from set 1.
I am using xors3d btw, not that it really makes any diff.

Function getentitytexture$(mesh,index)

	;how do i change the map channel???
		
	Local brush = xGetEntityBrush(mesh)
	Local tex = xGetBrushTexture(brush,index)
	texture_name$=StripPath$(xTextureName$(tex))
	If tex ; we only really need to know the info it it has a texture assigned.
	
		get_entity_info(mesh,tex);dump out entity/texture info
	EndIf
		Return texture_name$
		
	
End Function