[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44833] trunk/blender/doc/python_api/rst/ bge.types.rst: Fix #30524: documentation example code for bge.types. KX_MeshProxy did not work,

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Mar 12 14:04:11 CET 2012


Revision: 44833
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44833
Author:   blendix
Date:     2012-03-12 13:04:06 +0000 (Mon, 12 Mar 2012)
Log Message:
-----------
Fix #30524: documentation example code for bge.types.KX_MeshProxy did not work,
using fix suggested by Ryan King.

Modified Paths:
--------------
    trunk/blender/doc/python_api/rst/bge.types.rst

Modified: trunk/blender/doc/python_api/rst/bge.types.rst
===================================================================
--- trunk/blender/doc/python_api/rst/bge.types.rst	2012-03-12 12:45:55 UTC (rev 44832)
+++ trunk/blender/doc/python_api/rst/bge.types.rst	2012-03-12 13:04:06 UTC (rev 44833)
@@ -1806,9 +1806,9 @@
       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]




More information about the Bf-blender-cvs mailing list