materials
materials
Returns a list of the materials on a mesh
Return type: list [KX_BlenderMaterial] or
[KX_PolygonMaterial]
Sample
Code
# get controller
controller = GameLogic.getCurrentController()
# get object the controller is attached to
obj = controller.owner
# get the 1st mesh
mesh = obj.meshes[0]
# get a list of the materials
matList = mesh.materials
|