[Bf-blender-cvs] [7ab3d45] framebuffer: GPU Off-Screen Buffer now linked from API docs

Campbell Barton noreply at git.blender.org
Mon Oct 19 18:59:36 CEST 2015


Commit: 7ab3d454a30f873a626f5f742ecb4df869dbaf52
Author: Campbell Barton
Date:   Tue Oct 20 03:53:24 2015 +1100
Branches: framebuffer
https://developer.blender.org/rB7ab3d454a30f873a626f5f742ecb4df869dbaf52

GPU Off-Screen Buffer now linked from API docs

===================================================================

M	doc/python_api/sphinx_doc_gen.py
M	source/blender/python/intern/gpu_offscreen.c

===================================================================

diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 62276b0..1788b4c 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -261,6 +261,7 @@ else:
         "bpy.utils.previews",
         "bpy_extras",
         "gpu",
+        "gpu.offscreen",
         "mathutils",
         "mathutils.geometry",
         "mathutils.bvhtree",
@@ -1659,7 +1660,9 @@ def write_rst_contents(basepath):
         # mathutils
         "mathutils", "mathutils.geometry", "mathutils.bvhtree", "mathutils.kdtree", "mathutils.noise",
         # misc
-        "freestyle", "bgl", "blf", "gpu", "aud", "bpy_extras",
+        "freestyle", "bgl", "blf",
+        "gpu", "gpu.offscreen",
+        "aud", "bpy_extras",
         # bmesh, submodules are in own page
         "bmesh",
         )
@@ -1799,7 +1802,7 @@ def write_rst_importable_modules(basepath):
         # C_modules
         "aud"                  : "Audio System",
         "blf"                  : "Font Drawing",
-        "gpu.offscreen"                  : "GPU OffScreen",
+        "gpu.offscreen"        : "GPU Off-Screen Buffer",
         "bmesh"                : "BMesh Module",
         "bmesh.types"          : "BMesh Types",
         "bmesh.utils"          : "BMesh Utilities",
diff --git a/source/blender/python/intern/gpu_offscreen.c b/source/blender/python/intern/gpu_offscreen.c
index 67d2fa1..291fda5 100644
--- a/source/blender/python/intern/gpu_offscreen.c
+++ b/source/blender/python/intern/gpu_offscreen.c
@@ -82,7 +82,7 @@ static int bpy_gpu_offscreen_valid_check(BPy_GPUOffScreen *py_gpu_ofs)
 /* annoying since arg parsing won't check overflow */
 #define UINT_IS_NEG(n) ((n) > INT_MAX)
 
-PyDoc_STRVAR(pygpu_offscreen_width_doc, "Texture width.\n\n:type: i");
+PyDoc_STRVAR(pygpu_offscreen_width_doc, "Texture width.\n\n:type: int");
 static PyObject *pygpu_offscreen_width_get(BPy_GPUOffScreen *self, void *UNUSED(type))
 {
 	BPY_GPU_OFFSCREEN_CHECK_OBJ(self);
@@ -115,7 +115,7 @@ PyDoc_STRVAR(pygpu_offscreen_bind_doc,
 "\n"
 "   Bind the offscreen object.\n"
 "\n"
-"   :param save: save OpenGL current states\n"
+"   :param save: save OpenGL current states.\n"
 "   :type save: bool\n"
 );
 static PyObject *pygpu_offscreen_bind(BPy_GPUOffScreen *self, PyObject *args, PyObject *kwds)
@@ -141,7 +141,7 @@ PyDoc_STRVAR(pygpu_offscreen_unbind_doc,
 "\n"
 "   Unbind the offscreen object.\n"
 "\n"
-"   :param restore: restore OpenGL previous states\n"
+"   :param restore: restore OpenGL previous states.\n"
 "   :type restore: bool\n"
 );
 static PyObject *pygpu_offscreen_unbind(BPy_GPUOffScreen *self, PyObject *args, PyObject *kwds)
@@ -197,15 +197,15 @@ PyDoc_STRVAR(pygpu_offscreen_draw_view3d_doc,
 "\n"
 "   Draw the 3d viewport in the offscreen object.\n"
 "\n"
-"   :param scene: Scene to draw\n"
+"   :param scene: Scene to draw.\n"
 "   :type scene: :class:`bpy.types.Scene`\n"
-"   :param view3d: 3D View to get the drawing settings from\n"
+"   :param view3d: 3D View to get the drawing settings from.\n"
 "   :type view3d: :class:`bpy.types.SpaceView3D`\n"
-"   :param region: Region of the 3D View\n"
+"   :param region: Region of the 3D View.\n"
 "   :type region: :class:`bpy.types.Region`\n"
-"   :param modelview_matrix: ModelView Matrix\n"
+"   :param modelview_matrix: ModelView Matrix.\n"
 "   :type modelview_matrix: :class:`mathutils.Matrix`\n"
-"   :param projection_matrix: Projection Matrix\n"
+"   :param projection_matrix: Projection Matrix.\n"
 "   :type projection_matrix: :class:`mathutils.Matrix`\n"
 );
 static PyObject *pygpu_offscreen_draw_view3d(BPy_GPUOffScreen *self, PyObject *args, PyObject *kwds)




More information about the Bf-blender-cvs mailing list