[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39014] trunk/blender/doc/python_api/rst: rst API doc fixes: literalincluding bge.texture and bge. constraints examples + bgl fixes

Dalai Felinto dfelinto at gmail.com
Thu Aug 4 11:47:40 CEST 2011


Revision: 39014
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39014
Author:   dfelinto
Date:     2011-08-04 09:47:40 +0000 (Thu, 04 Aug 2011)
Log Message:
-----------
rst API doc fixes: literalincluding bge.texture and bge.constraints examples + bgl fixes

Modified Paths:
--------------
    trunk/blender/doc/python_api/rst/bge.constraints.rst
    trunk/blender/doc/python_api/rst/bge.texture.rst
    trunk/blender/doc/python_api/rst/bgl.rst

Modified: trunk/blender/doc/python_api/rst/bge.constraints.rst
===================================================================
--- trunk/blender/doc/python_api/rst/bge.constraints.rst	2011-08-04 09:47:09 UTC (rev 39013)
+++ trunk/blender/doc/python_api/rst/bge.constraints.rst	2011-08-04 09:47:40 UTC (rev 39014)
@@ -2,6 +2,10 @@
 Physics Constraints (bge.constraints)
 =====================================
 
+.. module:: bge.constraints
+
+.. literalinclude:: ../examples/bge.constraints.py
+
 .. function:: createConstraint(physicsid, physicsid2, constrainttype, [pivotX, pivotY, pivotZ, [axisX, axisY, axisZ, [flag]]]])
 
    Creates a constraint.

Modified: trunk/blender/doc/python_api/rst/bge.texture.rst
===================================================================
--- trunk/blender/doc/python_api/rst/bge.texture.rst	2011-08-04 09:47:09 UTC (rev 39013)
+++ trunk/blender/doc/python_api/rst/bge.texture.rst	2011-08-04 09:47:40 UTC (rev 39014)
@@ -36,6 +36,10 @@
 
 .. module:: bge.texture
 
+.. literalinclude:: ../examples/bge.texture.py
+
+.. literalinclude:: ../examples/bge.texture.1.py
+
 .. class:: VideoFFmpeg(file [, capture=-1, rate=25.0, width=0, height=0])
 
    FFmpeg video source

Modified: trunk/blender/doc/python_api/rst/bgl.rst
===================================================================
--- trunk/blender/doc/python_api/rst/bgl.rst	2011-08-04 09:47:09 UTC (rev 39013)
+++ trunk/blender/doc/python_api/rst/bgl.rst	2011-08-04 09:47:40 UTC (rev 39014)
@@ -15,7 +15,7 @@
 The "red book": "I{OpenGL Programming Guide: The Official Guide to Learning
 OpenGL}" and the online NeHe tutorials are two of the best resources.
 
-..note::
+.. note::
    You can use the :class:`Image` type to load and set textures.
    See :class:`Image.gl_load` and :class:`Image.gl_load`,
    for example.
@@ -1386,7 +1386,7 @@
         bgl.glGetFloatv(bgl.GL_MODELVIEW_MATRIX, view_matrix)
         f = 1.0 / view_matrix[0]
 
-		# Instead of the usual glRasterPos2i(xval, yval)
+        # Instead of the usual glRasterPos2i(xval, yval)
         bgl.glRasterPos2f(xval * f, yval * f)
 
 
@@ -1848,10 +1848,13 @@
    .. code-block:: python
 
       import bgl
+
       myByteBuffer = bgl.Buffer(bgl.GL_BYTE, [32, 32])
       bgl.glGetPolygonStipple(myByteBuffer)
+
       print(myByteBuffer.dimensions)
       print(myByteBuffer.to_list())
+
       sliceBuffer = myByteBuffer[0:16]
       print(sliceBuffer)
 




More information about the Bf-blender-cvs mailing list