|
getTextureNamegetTextureName(matID)Returns the name of the texture in the 1st texture slot on a material.Return type: string matID: Type:
integer
0 = 1st material on mesh
1 = 2nd material on mesh etc, etc, etc Note: Returns Null if there isn't
a texture in the first texture slot
Note: Returns
the
name of texture and not the name of the texture slot.
In
other words, if the the first texture slot named Tex1 holds an image
named
oak_leaf.jpg, it will return oak_leaf.jpg
Sample Code# get controllercontroller = GameLogic.getCurrentController()# get object the controller is attached toobj = controller.owner# get the 1st meshmesh = obj.meshes[0]# get first materialmatID = 0# get the name of the 1st texturetextureName = mesh.getTextureName(matID) |