Fix #30622: documentation example code for bge.types.KX_MeshProxy did not work,
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 21 Mar 2012 14:13:54 +0000 (14:13 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 21 Mar 2012 14:13:54 +0000 (14:13 +0000)
using fix suggested by Ryan King.

doc/python_api/rst/bge.types.rst

index fda05bb6ed5bcff1d341a381edb5a246c9ec2f24..bcef816dc9d2a577b188ad7cefc4290f701f8f1e 100644 (file)
@@ -1807,7 +1807,7 @@ Game Types (bge.types)
 
       for mesh in object.meshes:
          for m_index in range(len(mesh.materials)):
-            for v_index in range(mesh.getVertexArrayLength(mat)):
+            for v_index in range(mesh.getVertexArrayLength(m_index)):
                vertex = mesh.getVertex(m_index, v_index)
                # Do something with vertex here...
                # ... eg: colour the vertex red.