[Bf-blender-cvs] [72369c638d9] blender2.8: Cleanup: python doc-strings

Campbell Barton noreply at git.blender.org
Tue Nov 13 23:26:04 CET 2018


Commit: 72369c638d936a76ba58c98b4b89626f6ff28f32
Author: Campbell Barton
Date:   Wed Nov 14 09:04:24 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB72369c638d936a76ba58c98b4b89626f6ff28f32

Cleanup: python doc-strings

Indentation & trailing space.

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

M	source/blender/python/bmesh/bmesh_py_api.c
M	source/blender/python/bmesh/bmesh_py_types.c
M	source/blender/python/gpu/gpu_py_batch.c
M	source/blender/python/gpu/gpu_py_element.c
M	source/blender/python/gpu/gpu_py_shader.c
M	source/blender/python/intern/bpy_app_translations.c
M	source/blender/python/intern/bpy_rna.c
M	source/blender/python/mathutils/mathutils_Quaternion.c
M	source/blender/python/mathutils/mathutils_geometry.c

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

diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c
index 235ede1e8fd..012f7b1232d 100644
--- a/source/blender/python/bmesh/bmesh_py_api.c
+++ b/source/blender/python/bmesh/bmesh_py_api.c
@@ -115,7 +115,7 @@ static PyObject *bpy_bm_from_edit_mesh(PyObject *UNUSED(self), PyObject *value)
 PyDoc_STRVAR(bpy_bm_update_edit_mesh_doc,
 ".. method:: update_edit_mesh(mesh, loop_triangles=True, destructive=True)\n"
 "\n"
-"   Update the mesh after changes to the BMesh in editmode, \n"
+"   Update the mesh after changes to the BMesh in editmode,\n"
 "   optionally recalculating n-gon tessellation.\n"
 "\n"
 "   :arg mesh: The editmode mesh.\n"
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index bde5bca5780..3950f623f54 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -3275,10 +3275,10 @@ PyDoc_STRVAR(bpy_bmloop_doc,
 "This is normally accessed from :class:`BMFace.loops` where each face loop represents a corner of the face.\n"
 );
 PyDoc_STRVAR(bpy_bmelemseq_doc,
-"General sequence type used for accessing any sequence of \n"
+"General sequence type used for accessing any sequence of\n"
 ":class:`BMVert`, :class:`BMEdge`, :class:`BMFace`, :class:`BMLoop`.\n"
 "\n"
-"When accessed via :class:`BMesh.verts`, :class:`BMesh.edges`, :class:`BMesh.faces` \n"
+"When accessed via :class:`BMesh.verts`, :class:`BMesh.edges`, :class:`BMesh.faces`\n"
 "there are also functions to create/remomove items.\n"
 );
 PyDoc_STRVAR(bpy_bmiter_doc,
diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c
index 77dcfad2c9f..ffbd2a17e34 100644
--- a/source/blender/python/gpu/gpu_py_batch.c
+++ b/source/blender/python/gpu/gpu_py_batch.c
@@ -132,14 +132,14 @@ static PyObject *bpygpu_Batch_new(PyTypeObject *UNUSED(type), PyObject *args, Py
 PyDoc_STRVAR(bpygpu_Batch_vertbuf_add_doc,
 ".. method:: vertbuf_add(buf)\n"
 "\n"
-"   Add another vertex buffer to the Batch. \n"
-"   It is not possible to add more vertices to the batch using this method. \n"
-"   Instead it can be used to add more attributes to the existing vertices. \n"
-"   A good use case would be when you have a separate vertex buffer for vertex positions and vertex normals. \n"
-"   Current a batch can have at most " STRINGIFY(GPU_BATCH_VBO_MAX_LEN) " vertex buffers. \n"
+"   Add another vertex buffer to the Batch.\n"
+"   It is not possible to add more vertices to the batch using this method.\n"
+"   Instead it can be used to add more attributes to the existing vertices.\n"
+"   A good use case would be when you have a separate vertex buffer for vertex positions and vertex normals.\n"
+"   Current a batch can have at most " STRINGIFY(GPU_BATCH_VBO_MAX_LEN) " vertex buffers.\n"
 "\n"
-"   :param buf: The vertex buffer that will be added to the batch. \n"
-"   :type buf: :class:`gpu.types.GPUVertBuf` \n"
+"   :param buf: The vertex buffer that will be added to the batch.\n"
+"   :type buf: :class:`gpu.types.GPUVertBuf`\n"
 );
 static PyObject *bpygpu_Batch_vertbuf_add(BPyGPUBatch *self, BPyGPUVertBuf *py_buf)
 {
@@ -176,12 +176,12 @@ static PyObject *bpygpu_Batch_vertbuf_add(BPyGPUBatch *self, BPyGPUVertBuf *py_b
 PyDoc_STRVAR(bpygpu_Batch_program_set_doc,
 ".. method:: program_set(program)\n"
 "\n"
-"   Assign a shader to this batch that will be used for drawing when not overwritten later. \n"
-"   Note: This method has to be called in the draw context that the batch will be drawn in. \n"
-"   This function does not need to be called when you always set the shader when calling `batch.draw`. \n"
+"   Assign a shader to this batch that will be used for drawing when not overwritten later.\n"
+"   Note: This method has to be called in the draw context that the batch will be drawn in.\n"
+"   This function does not need to be called when you always set the shader when calling `batch.draw`.\n"
 "\n"
-"   :param program: The program/shader the batch will use in future draw calls. \n"
-"   :type program: :class:`gpu.types.GPUShader` \n"
+"   :param program: The program/shader the batch will use in future draw calls.\n"
+"   :type program: :class:`gpu.types.GPUShader`\n"
 );
 static PyObject *bpygpu_Batch_program_set(BPyGPUBatch *self, BPyGPUShader *py_shader)
 {
@@ -222,10 +222,10 @@ static PyObject *bpygpu_Batch_program_set(BPyGPUBatch *self, BPyGPUShader *py_sh
 PyDoc_STRVAR(bpygpu_Batch_draw_doc,
 ".. method:: draw(program=None)\n"
 "\n"
-"   Run the drawing program with the parameters assigned to the batch. \n"
+"   Run the drawing program with the parameters assigned to the batch.\n"
 "\n"
-"   :param program: Program that performs the drawing operations. \n"
-"      If ``None`` is passed, the last program setted to this batch will run. \n"
+"   :param program: Program that performs the drawing operations.\n"
+"      If ``None`` is passed, the last program setted to this batch will run.\n"
 "   :type program: :class:`gpu.types.GPUShader`\n"
 );
 static PyObject *bpygpu_Batch_draw(BPyGPUBatch *self, PyObject *args)
@@ -320,7 +320,7 @@ static void bpygpu_Batch_dealloc(BPyGPUBatch *self)
 PyDoc_STRVAR(py_gpu_batch_doc,
 ".. class:: GPUBatch(type, buf, elem=None)\n"
 "\n"
-"   Reusable container for drawable geometry. \n"
+"   Reusable container for drawable geometry.\n"
 "\n"
 "   :arg type: One of these primitive types: {\n"
 "       `POINTS`,\n"
diff --git a/source/blender/python/gpu/gpu_py_element.c b/source/blender/python/gpu/gpu_py_element.c
index 10990abc5e6..12027d2e2b8 100644
--- a/source/blender/python/gpu/gpu_py_element.c
+++ b/source/blender/python/gpu/gpu_py_element.c
@@ -198,7 +198,7 @@ static void bpygpu_IndexBuf_dealloc(BPyGPUIndexBuf *self)
 PyDoc_STRVAR(py_gpu_element_doc,
 ".. class:: GPUIndexBuf(type, seq)\n"
 "\n"
-"   Contains an index buffer. \n"
+"   Contains an index buffer.\n"
 "\n"
 "   :param type: One of these primitive types: {\n"
 "      `POINTS`,\n"
@@ -206,10 +206,10 @@ PyDoc_STRVAR(py_gpu_element_doc,
 "      `TRIS`,\n"
 "      `LINE_STRIP_ADJ` }\n"
 "   :type type: `str`\n"
-"   :param seq: Indices this index buffer will contain. \n"
-"       Whether a 1D or 2D sequence is required depends on the type. \n"
-"       Optionally the sequence can support the buffer protocol. \n"
-"   :type seq: 1D or 2D sequence \n"
+"   :param seq: Indices this index buffer will contain.\n"
+"      Whether a 1D or 2D sequence is required depends on the type.\n"
+"      Optionally the sequence can support the buffer protocol.\n"
+"   :type seq: 1D or 2D sequence\n"
 );
 PyTypeObject BPyGPUIndexBuf_Type = {
 	PyVarObject_HEAD_INIT(NULL, 0)
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index 19d6c8070f8..46acf22d7e2 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -145,7 +145,7 @@ static PyObject *bpygpu_shader_new(PyTypeObject *UNUSED(type), PyObject *args, P
 PyDoc_STRVAR(bpygpu_shader_bind_doc,
 ".. method:: bind()\n"
 "\n"
-"   Bind the shader object. Required to be able to change uniforms of this shader. \n"
+"   Bind the shader object. Required to be able to change uniforms of this shader.\n"
 );
 static PyObject *bpygpu_shader_bind(BPyGPUShader *self)
 {
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index ffc54969d8c..2a5efc15b87 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -289,12 +289,12 @@ PyDoc_STRVAR(app_translations_py_messages_register_doc,
 "   Registers an addon's UI translations.\n"
 "\n"
 "   .. note::\n"
-"       Does nothing when Blender is built without internationalization support.\n"
+"      Does nothing when Blender is built without internationalization support.\n"
 "\n"
 "   :arg module_name: The name identifying the addon.\n"
 "   :type module_name: string\n"
 "   :arg translations_dict: A dictionary built like that:\n"
-"       ``{locale: {msg_key: msg_translation, ...}, ...}``\n"
+"      ``{locale: {msg_key: msg_translation, ...}, ...}``\n"
 "   :type translations_dict: dict\n"
 "\n"
 );
@@ -337,7 +337,7 @@ PyDoc_STRVAR(app_translations_py_messages_unregister_doc,
 "   Unregisters an addon's UI translations.\n"
 "\n"
 "   .. note::\n"
-"       Does nothing when Blender is built without internationalization support.\n"
+"      Does nothing when Blender is built without internationalization support.\n"
 "\n"
 "   :arg module_name: The name identifying the addon.\n"
 "   :type module_name: string\n"
@@ -425,8 +425,8 @@ PyDoc_STRVAR(app_translations_contexts_doc,
 "A named tuple containing all pre-defined translation contexts.\n"
 "\n"
 ".. warning::\n"
-"    Never use a (new) context starting with \"" BLT_I18NCONTEXT_DEFAULT_BPYRNA "\", it would be internally \n"
-"    assimilated as the default one!\n"
+"   Never use a (new) context starting with \"" BLT_I18NCONTEXT_DEFAULT_BPYRNA "\", it would be internally\n"
+"   assimilated as the default one!\n"
 );
 
 PyDoc_STRVAR(app_translations_contexts_C_to_py_doc,
@@ -522,16 +522,16 @@ PyDoc_STRVAR(app_translations_pgettext_doc,
 "   Try to translate the given msgid (with optional msgctxt).\n"
 "\n"
 "   .. note::\n"
-"       The ``(msgid, msgctxt)`` parameters order has been switched compared to gettext function, to allow\n"
-"       single-parameter calls (context then defaults to BLT_I18NCONTEXT_DEFAULT).\n"
+"      The ``(msgid, msgctxt)`` parameters order has been switched compared to gettext function, to allow\n"
+"      single-parameter calls (context then defaults to BLT_I18NCONTEXT_DEFAULT).\n"
 "\n"
 "   .. note::\n"
-"       You should really rarely need to use this function in regular addon code, as all translation should be\n"
-"       handled by Blender internal code. The only exception are string containing formatting (like \"File: %r\"),\n"
-"       but you should rather use :func:`pgettext_iface`/:func:`pgettext_tip` in those cases!\n"
+"      You should really rarely need to use this function in regular addon code, as all translation should be\n"
+"      handled 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list