numPolygons
numPolygons
Returns the number of polygons on a mesh
Return type: integer
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 the number of polygons on the mesh
numPoly = mesh.numPolygons
|