From 74b7bc1228b502c1fec88e1399601144d7bd34f2 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 12 Mar 2012 13:04:06 +0000 Subject: Fix #30524: documentation example code for bge.types.KX_MeshProxy did not work, using fix suggested by Ryan King. --- doc/python_api/rst/bge.types.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/python_api/rst/bge.types.rst') diff --git a/doc/python_api/rst/bge.types.rst b/doc/python_api/rst/bge.types.rst index 3c15362a4ec..fda05bb6ed5 100644 --- a/doc/python_api/rst/bge.types.rst +++ b/doc/python_api/rst/bge.types.rst @@ -1806,9 +1806,9 @@ Game Types (bge.types) object = cont.owner for mesh in object.meshes: - for material in mesh.materials: + for m_index in range(len(mesh.materials)): for v_index in range(mesh.getVertexArrayLength(mat)): - vertex = mesh.getVertex(mat, v_index) + vertex = mesh.getVertex(m_index, v_index) # Do something with vertex here... # ... eg: colour the vertex red. vertex.colour = [1.0, 0.0, 0.0, 1.0] -- cgit v1.2.3