Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-05-12 10:59:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-12 11:23:29 +0300
commitf727df6076241756a07aebdd495284203702dd1b (patch)
treea81f66e0b3fe2eb5de68d502fba348007bfa07f5
parent311f6cac921b84cdbf770fe10ef2d656ee1817e5 (diff)
Doc: correct rst syntax
also remove some API docs from example
-rw-r--r--doc/python_api/rst/bge.constraints.rst12
-rw-r--r--doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst15
-rw-r--r--release/scripts/templates_py/ui_previews_custom_icon.py8
-rw-r--r--source/blender/python/intern/bpy_utils_previews.c12
-rw-r--r--source/blender/python/intern/bpy_utils_units.c10
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c2
6 files changed, 28 insertions, 31 deletions
diff --git a/doc/python_api/rst/bge.constraints.rst b/doc/python_api/rst/bge.constraints.rst
index cf8565924b0..eaaf806a4a9 100644
--- a/doc/python_api/rst/bge.constraints.rst
+++ b/doc/python_api/rst/bge.constraints.rst
@@ -23,12 +23,12 @@ Physics Constraints (bge.constraints)
:arg constrainttype: the type of the constraint. The constraint types are:
:type constrainttype: int
- - :class:`POINTTOPOINT_CONSTRAINT`
- - :class:`LINEHINGE_CONSTRAINT`
- - :class:`ANGULAR_CONSTRAINT`
- - :class:`CONETWIST_CONSTRAINT`
- - :class:`VEHICLE_CONSTRAINT`
- - :class:`GENERIC_6DOF_CONSTRAINT`
+ - :class:`POINTTOPOINT_CONSTRAINT`
+ - :class:`LINEHINGE_CONSTRAINT`
+ - :class:`ANGULAR_CONSTRAINT`
+ - :class:`CONETWIST_CONSTRAINT`
+ - :class:`VEHICLE_CONSTRAINT`
+ - :class:`GENERIC_6DOF_CONSTRAINT`
:arg pivot_X: pivot X position
:type pivot_X: float (optional)
diff --git a/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst
index 2069bfb1dca..588f568cbb0 100644
--- a/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst
+++ b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst
@@ -29,6 +29,7 @@ base class --- :class:`PyObjectPlus`
* Lowerlimit < Upperlimit -> axis it limited in that range
PHY_LINEHINGE_CONSTRAINT = 2 or PHY_ANGULAR_CONSTRAINT = 3:
+
axis = 3 is a constraint limit, with low/high limit value
* 3: X axis angle
@@ -38,6 +39,7 @@ base class --- :class:`PyObjectPlus`
:type value1: float
PHY_CONE_TWIST_CONSTRAINT = 3:
+
axis = 3..5 are constraint limits, high limit values
* 3: X axis angle
* 4: Y axis angle
@@ -49,6 +51,7 @@ base class --- :class:`PyObjectPlus`
:type value1: float
PHY_GENERIC_6DOF_CONSTRAINT = 12:
+
axis = 0..2 are constraint limits, with low/high limit value
* 0: X axis position
* 1: Y axis position
@@ -130,10 +133,10 @@ base class --- :class:`PyObjectPlus`
Returns the contraint type (read only)
:type: integer
- - 1 = :class:`~bge.constraints.POINTTOPOINT_CONSTRAINT`
- - 2 = :class:`~bge.constraints.LINEHINGE_CONSTRAINT`
- - 3 = :class:`~bge.constraints.ANGULAR_CONSTRAINT`
- - 4 = :class:`~bge.constraints.CONETWIST_CONSTRAINT`
- - 11 = :class:`~bge.constraints.VEHICLE_CONSTRAINT`
- - 12 = :class:`~bge.constraints.GENERIC_6DOF_CONSTRAINT`
+ - 1 = :class:`~bge.constraints.POINTTOPOINT_CONSTRAINT`
+ - 2 = :class:`~bge.constraints.LINEHINGE_CONSTRAINT`
+ - 3 = :class:`~bge.constraints.ANGULAR_CONSTRAINT`
+ - 4 = :class:`~bge.constraints.CONETWIST_CONSTRAINT`
+ - 11 = :class:`~bge.constraints.VEHICLE_CONSTRAINT`
+ - 12 = :class:`~bge.constraints.GENERIC_6DOF_CONSTRAINT`
diff --git a/release/scripts/templates_py/ui_previews_custom_icon.py b/release/scripts/templates_py/ui_previews_custom_icon.py
index badc6614d40..6eb4ad2992e 100644
--- a/release/scripts/templates_py/ui_previews_custom_icon.py
+++ b/release/scripts/templates_py/ui_previews_custom_icon.py
@@ -56,13 +56,7 @@ def register():
my_icons_dir = os.path.join(os.path.dirname(__file__), "icons")
# load a preview thumbnail of a file and store in the previews collection
- pcoll.load(
- # identifier
- "my_icon",
- # path to image
- os.path.join(my_icons_dir, "icon-image.png"),
- # file type to generate preview from. others are: MOVIE, FONT, BLEND
- 'IMAGE')
+ pcoll.load("my_icon", os.path.join(my_icons_dir, "icon-image.png"), 'IMAGE')
preview_collections["main"] = pcoll
diff --git a/source/blender/python/intern/bpy_utils_previews.c b/source/blender/python/intern/bpy_utils_previews.c
index 5509ff50f5f..fed7c7210de 100644
--- a/source/blender/python/intern/bpy_utils_previews.c
+++ b/source/blender/python/intern/bpy_utils_previews.c
@@ -82,16 +82,16 @@ static PyObject *bpy_utils_previews_new(PyObject *UNUSED(self), PyObject *args)
}
PyDoc_STRVAR(bpy_utils_previews_load_doc,
-".. method:: load(name, path, path_type, force_reload)\n"
+".. method:: load(name, filepath, filetype, force_reload=False)\n"
"\n"
" Generate a new preview from given file path, or return existing one matching ``name``.\n"
"\n"
" :arg name: The name (unique id) identifying the preview.\n"
" :type name: string\n"
-" :arg path: The file path to generate the preview from.\n"
-" :type path: string\n"
-" :arg path_type: The type of file, needed to generate the preview in [" STR_SOURCE_TYPES "].\n"
-" :type path_type: string\n"
+" :arg filepath: The file path to generate the preview from.\n"
+" :type filepath: string\n"
+" :arg filetype: The type of file, needed to generate the preview in [" STR_SOURCE_TYPES "].\n"
+" :type filetype: string\n"
" :arg force_reload: If True, force running thumbnail manager even if preview already exists in cache.\n"
" :type force_reload: bool\n"
" :return: The Preview matching given name, or a new empty one.\n"
@@ -123,7 +123,7 @@ static PyObject *bpy_utils_previews_load(PyObject *UNUSED(self), PyObject *args)
}
else {
PyErr_Format(PyExc_ValueError,
- "load: invalid '%' path type, only [" STR_SOURCE_TYPES "] "
+ "load: invalid '%s' filetype, only [" STR_SOURCE_TYPES "] "
"are supported", path_type_s);
return NULL;
}
diff --git a/source/blender/python/intern/bpy_utils_units.c b/source/blender/python/intern/bpy_utils_units.c
index a6df8f54cc3..d40e7e070ac 100644
--- a/source/blender/python/intern/bpy_utils_units.c
+++ b/source/blender/python/intern/bpy_utils_units.c
@@ -155,18 +155,18 @@ static bool bpyunits_validate(const char *usys_str, const char *ucat_str, int *r
}
PyDoc_STRVAR(bpyunits_to_value_doc,
-".. method:: to_value(unit_system, unit_category, str_input, [str_ref_unit=None])\n"
+".. method:: to_value(unit_system, unit_category, str_input, str_ref_unit=None)\n"
"\n"
" Convert a given input string into a float value.\n"
"\n"
" :arg unit_system: The unit system, from :attr:`bpy.utils.units.systems`.\n"
" :type unit_system: string\n"
-" :arg unit_category: The category of data we are converting (length, area, rotation, etc.), "
+" :arg unit_category: The category of data we are converting (length, area, rotation, etc.),\n"
" from :attr:`bpy.utils.units.categories`.\n"
" :type unit_category: string\n"
" :arg str_input: The string to convert to a float value.\n"
" :type str_input: string\n"
-" :arg str_ref_unit: A reference string from which to extract a default unit, if none is found in :arg:`str_input`.\n"
+" :arg str_ref_unit: A reference string from which to extract a default unit, if none is found in ``str_input``.\n"
" :type str_ref_unit: string or None\n"
" :return: The converted/interpreted value.\n"
" :rtype: float\n"
@@ -221,13 +221,13 @@ static PyObject *bpyunits_to_value(PyObject *UNUSED(self), PyObject *args, PyObj
}
PyDoc_STRVAR(bpyunits_to_string_doc,
-".. method:: to_string(unit_system, unit_category, value, [precision=3, [split_unit=False, [compatible_unit=False]]])\n"
+".. method:: to_string(unit_system, unit_category, value, precision=3, split_unit=False, compatible_unit=False)\n"
"\n"
" Convert a given input float value into a string with units.\n"
"\n"
" :arg unit_system: The unit system, from :attr:`bpy.utils.units.systems`.\n"
" :type unit_system: string\n"
-" :arg unit_category: The category of data we are converting (length, area, rotation, etc.), "
+" :arg unit_category: The category of data we are converting (length, area, rotation, etc.),\n"
" from :attr:`bpy.utils.units.categories`.\n"
" :type unit_category: string\n"
" :arg value: The value to convert to a string.\n"
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index 91e2a635400..817173c5bc6 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -2757,7 +2757,7 @@ PyDoc_STRVAR(matrix_doc,
" matrices from 2x2 up to 4x4.\n"
"\n"
" :param rows: Sequence of rows.\n"
-" When ommitted, a 4x4 identity matrix is constructed.\n"
+" When ommitted, a 4x4 identity matrix is constructed.\n"
" :type rows: 2d number sequence\n"
);
PyTypeObject matrix_Type = {