sphinx docstrng formatting (some lines were getting really long)

This commit is contained in:
Campbell Barton 2011-05-26 19:13:01 +00:00
parent c6705e464f
commit 78d41d061b
7 changed files with 99 additions and 45 deletions

@ -93,7 +93,8 @@ PyDoc_STRVAR(Color_copy_doc,
" :return: A copy of the color.\n"
" :rtype: :class:`Color`\n"
"\n"
" .. note:: use this to get a copy of a wrapped color with no reference to the original data.\n"
" .. note:: use this to get a copy of a wrapped color with\n"
" no reference to the original data.\n"
);
static PyObject *Color_copy(ColorObject *self)
{

@ -185,7 +185,8 @@ static PyObject *Euler_zero(EulerObject * self)
PyDoc_STRVAR(Euler_rotate_axis_doc,
".. method:: rotate_axis(axis, angle)\n"
"\n"
" Rotates the euler a certain amount and returning a unique euler rotation (no 720 degree pitches).\n"
" Rotates the euler a certain amount and returning a unique euler rotation\n"
" (no 720 degree pitches).\n"
"\n"
" :arg axis: single character in ['X, 'Y', 'Z'].\n"
" :type axis: string\n"
@ -247,7 +248,8 @@ static PyObject *Euler_rotate(EulerObject * self, PyObject *value)
PyDoc_STRVAR(Euler_make_compatible_doc,
".. method:: make_compatible(other)\n"
"\n"
" Make this euler compatible with another, so interpolating between them works as intended.\n"
" Make this euler compatible with another,\n"
" so interpolating between them works as intended.\n"
"\n"
" .. note:: the rotation order is not taken into account for this function.\n"
);
@ -279,7 +281,8 @@ PyDoc_STRVAR(Euler_copy_doc,
" :return: A copy of the euler.\n"
" :rtype: :class:`Euler`\n"
"\n"
" .. note:: use this to get a copy of a wrapped euler with no reference to the original data.\n"
" .. note:: use this to get a copy of a wrapped euler with\n"
" no reference to the original data.\n"
);
static PyObject *Euler_copy(EulerObject *self)
{

@ -195,7 +195,8 @@ PyDoc_STRVAR(C_Matrix_Rotation_doc,
" :type angle: float\n"
" :arg size: The size of the rotation matrix to construct [2, 4].\n"
" :type size: int\n"
" :arg axis: a string in ['X', 'Y', 'Z'] or a 3D Vector Object (optional when size is 2).\n"
" :arg axis: a string in ['X', 'Y', 'Z'] or a 3D Vector Object\n"
" (optional when size is 2).\n"
" :type axis: string or :class:`Vector`\n"
" :return: A new rotation matrix.\n"
" :rtype: :class:`Matrix`\n"
@ -407,7 +408,9 @@ PyDoc_STRVAR(C_Matrix_OrthoProjection_doc,
"\n"
" Create a matrix to represent an orthographic projection.\n"
"\n"
" :arg axis: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'], where a single axis is for a 2D matrix. Or a vector for an arbitrary axis\n"
" :arg axis: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],\n"
" where a single axis is for a 2D matrix.\n"
" Or a vector for an arbitrary axis\n"
" :type axis: string or :class:`Vector`\n"
" :arg size: The size of the projection matrix to construct [2, 4].\n"
" :type size: int\n"
@ -513,11 +516,13 @@ PyDoc_STRVAR(C_Matrix_Shear_doc,
"\n"
" Create a matrix to represent an shear transformation.\n"
"\n"
" :arg plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'], where a single axis is for a 2D matrix only.\n"
" :arg plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],\n"
" where a single axis is for a 2D matrix only.\n"
" :type plane: string\n"
" :arg size: The size of the shear matrix to construct [2, 4].\n"
" :type size: int\n"
" :arg factor: The factor of shear to apply. For a 3 or 4 *size* matrix pass a pair of floats corrasponding with the *plane* axis.\n"
" :arg factor: The factor of shear to apply. For a 3 or 4 *size* matrix\n"
" pass a pair of floats corrasponding with the *plane* axis.\n"
" :type factor: float or float pair\n"
" :return: A new shear matrix.\n"
" :rtype: :class:`Matrix`\n"
@ -660,11 +665,15 @@ static PyObject *Matrix_to_quaternion(MatrixObject *self)
PyDoc_STRVAR(Matrix_to_euler_doc,
".. method:: to_euler(order, euler_compat)\n"
"\n"
" Return an Euler representation of the rotation matrix (3x3 or 4x4 matrix only).\n"
" Return an Euler representation of the rotation matrix\n"
" (3x3 or 4x4 matrix only).\n"
"\n"
" :arg order: Optional rotation order argument in ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n"
" :arg order: Optional rotation order argument in\n"
" ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n"
" :type order: string\n"
" :arg euler_compat: Optional euler argument the new euler will be made compatible with (no axis flipping between them). Useful for converting a series of matrices to animation curves.\n"
" :arg euler_compat: Optional euler argument the new euler will be made\n"
" compatible with (no axis flipping between them).\n"
" Useful for converting a series of matrices to animation curves.\n"
" :type euler_compat: :class:`Euler`\n"
" :return: Euler representation of the matrix.\n"
" :rtype: :class:`Euler`\n"
@ -1174,7 +1183,8 @@ PyDoc_STRVAR(Matrix_identity_doc,
"\n"
" Set the matrix to the identity matrix.\n"
"\n"
" .. note:: An object with zero location and rotation, a scale of one, will have an identity matrix.\n"
" .. note:: An object with zero location and rotation, a scale of one,\n"
" will have an identity matrix.\n"
"\n"
" .. seealso:: <http://en.wikipedia.org/wiki/Identity_matrix>\n"
);

@ -72,9 +72,12 @@ PyDoc_STRVAR(Quaternion_to_euler_doc,
"\n"
" Return Euler representation of the quaternion.\n"
"\n"
" :arg order: Optional rotation order argument in ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n"
" :arg order: Optional rotation order argument in\n"
" ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n"
" :type order: string\n"
" :arg euler_compat: Optional euler argument the new euler will be made compatible with (no axis flipping between them). Useful for converting a series of matrices to animation curves.\n"
" :arg euler_compat: Optional euler argument the new euler will be made\n"
" compatible with (no axis flipping between them).\n"
" Useful for converting a series of matrices to animation curves.\n"
" :type euler_compat: :class:`Euler`\n"
" :return: Euler representation of the quaternion.\n"
" :rtype: :class:`Euler`\n"
@ -417,7 +420,8 @@ PyDoc_STRVAR(Quaternion_copy_doc,
" :return: A copy of the quaternion.\n"
" :rtype: :class:`Quaternion`\n"
"\n"
" .. note:: use this to get a copy of a wrapped quaternion with no reference to the original data.\n"
" .. note:: use this to get a copy of a wrapped quaternion with\n"
" no reference to the original data.\n"
);
static PyObject *Quaternion_copy(QuaternionObject *self)
{

@ -107,9 +107,11 @@ PyDoc_STRVAR(Vector_normalize_doc,
"\n"
" Normalize the vector, making the length of the vector always 1.0.\n"
"\n"
" .. warning:: Normalizing a vector where all values are zero results in all axis having a nan value (not a number).\n"
" .. warning:: Normalizing a vector where all values are zero results\n"
" in all axis having a nan value (not a number).\n"
"\n"
" .. note:: Normalize works for vectors of all sizes, however 4D Vectors w axis is left untouched.\n"
" .. note:: Normalize works for vectors of all sizes,\n"
" however 4D Vectors w axis is left untouched.\n"
);
static PyObject *Vector_normalize(VectorObject *self)
{
@ -565,7 +567,8 @@ PyDoc_STRVAR(Vector_angle_doc,
"\n"
" :arg other: another vector to compare the angle with\n"
" :type other: :class:`Vector`\n"
" :arg fallback: return this value when the angle cant be calculated (zero length vector)\n"
" :arg fallback: return this value when the angle cant be calculated\n"
" (zero length vector)\n"
" :type fallback: any\n"
" :return: angle in radians or fallback when given\n"
" :rtype: float\n"
@ -618,7 +621,8 @@ static PyObject *Vector_angle(VectorObject *self, PyObject *args)
PyDoc_STRVAR(Vector_rotation_difference_doc,
".. function:: difference(other)\n"
"\n"
" Returns a quaternion representing the rotational difference between this vector and another.\n"
" Returns a quaternion representing the rotational difference between this\n"
" vector and another.\n"
"\n"
" :arg other: second vector.\n"
" :type other: :class:`Vector`\n"
@ -764,7 +768,8 @@ PyDoc_STRVAR(Vector_copy_doc,
" :return: A copy of the vector.\n"
" :rtype: :class:`Vector`\n"
"\n"
" .. note:: use this to get a copy of a wrapped vector with no reference to the original data.\n"
" .. note:: use this to get a copy of a wrapped vector with\n"
" no reference to the original data.\n"
);
static PyObject *Vector_copy(VectorObject *self)
{

@ -839,11 +839,18 @@ PyDoc_STRVAR(BPy_EnumProperty_doc,
"\n"
BPY_PROPDEF_NAME_DOC
BPY_PROPDEF_DESC_DOC
" :arg default: The default value for this enum, A string when *ENUM_FLAG* is disabled otherwise a set which may only contain string identifiers used in *items*.\n"
" :arg default: The default value for this enum, A string when *ENUM_FLAG*\n"
" is disabled otherwise a set which may only contain string identifiers\n"
" used in *items*.\n"
" :type default: string or set\n"
" :arg options: Enumerator in ['HIDDEN', 'ANIMATABLE', 'ENUM_FLAG'].\n"
" :type options: set\n"
" :arg items: sequence of enum items formatted: [(identifier, name, description), ...] where the identifier is used for python access and other values are used for the interface. For dynamic values a callback can be passed which returns a list in the format described, taking 2 arguments - self and context argument\n"
" :arg items: sequence of enum items formatted:\n"
" [(identifier, name, description), ...] where the identifier is used\n"
" for python access and other values are used for the interface.\n"
" For dynamic values a callback can be passed which returns a list in\n"
" the same format as the static list.\n"
" This function must take 2 arguments (self, context)\n"
" :type items: sequence of string triplets or a function\n"
);
static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)

@ -2530,12 +2530,14 @@ static PyMappingMethods pyrna_struct_as_mapping= {
PyDoc_STRVAR(pyrna_struct_keys_doc,
".. method:: keys()\n"
"\n"
" Returns the keys of this objects custom properties (matches pythons dictionary function of the same name).\n"
" Returns the keys of this objects custom properties (matches pythons\n"
" dictionary function of the same name).\n"
"\n"
" :return: custom property keys.\n"
" :rtype: list of strings\n"
"\n"
" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone` classes support custom properties.\n"
" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone` classes\n"
" support custom properties.\n"
);
static PyObject *pyrna_struct_keys(BPy_PropertyRNA *self)
{
@ -2557,12 +2559,14 @@ static PyObject *pyrna_struct_keys(BPy_PropertyRNA *self)
PyDoc_STRVAR(pyrna_struct_items_doc,
".. method:: items()\n"
"\n"
" Returns the items of this objects custom properties (matches pythons dictionary function of the same name).\n"
" Returns the items of this objects custom properties (matches pythons\n"
" dictionary function of the same name).\n"
"\n"
" :return: custom property key, value pairs.\n"
" :rtype: list of key, value tuples\n"
"\n"
" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone` classes support custom properties.\n"
" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone`\n"
" classes support custom properties.\n"
);
static PyObject *pyrna_struct_items(BPy_PropertyRNA *self)
{
@ -2584,12 +2588,14 @@ static PyObject *pyrna_struct_items(BPy_PropertyRNA *self)
PyDoc_STRVAR(pyrna_struct_values_doc,
".. method:: values()\n"
"\n"
" Returns the values of this objects custom properties (matches pythons dictionary function of the same name).\n"
" Returns the values of this objects custom properties (matches pythons\n"
" dictionary function of the same name).\n"
"\n"
" :return: custom property values.\n"
" :rtype: list\n"
"\n"
" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone` classes support custom properties.\n"
" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone`\n"
" classes support custom properties.\n"
);
static PyObject *pyrna_struct_values(BPy_PropertyRNA *self)
{
@ -2688,7 +2694,8 @@ PyDoc_STRVAR(pyrna_struct_path_resolve_doc,
"\n"
" :arg path: path which this property resolves.\n"
" :type path: string\n"
" :arg coerce: optional argument, when True, the property will be converted into its python representation.\n"
" :arg coerce: optional argument, when True, the property will be converted\n"
" into its python representation.\n"
" :type coerce: boolean\n"
);
static PyObject *pyrna_struct_path_resolve(BPy_StructRNA *self, PyObject *args)
@ -2743,9 +2750,11 @@ PyDoc_STRVAR(pyrna_struct_path_from_id_doc,
"\n"
" Returns the data path from the ID to this object (string).\n"
"\n"
" :arg property: Optional property name which can be used if the path is to a property of this object.\n"
" :arg property: Optional property name which can be used if the path is\n"
" to a property of this object.\n"
" :type property: string\n"
" :return: The path from :class:`bpy_struct.id_data` to this struct and property (when given).\n"
" :return: The path from :class:`bpy_struct.id_data`\n"
" to this struct and property (when given).\n"
" :rtype: str\n"
);
static PyObject *pyrna_struct_path_from_id(BPy_StructRNA *self, PyObject *args)
@ -2827,7 +2836,8 @@ static PyObject *pyrna_prop_path_from_id(BPy_PropertyRNA *self)
PyDoc_STRVAR(pyrna_struct_type_recast_doc,
".. method:: type_recast()\n"
"\n"
" Return a new instance, this is needed because types such as textures can be changed at runtime.\n"
" Return a new instance, this is needed because types\n"
" such as textures can be changed at runtime.\n"
"\n"
" :return: a new instance of this object with the type initialized again.\n"
" :rtype: subclass of :class:`bpy_struct`\n"
@ -3437,7 +3447,8 @@ static PyGetSetDef pyrna_struct_getseters[]= {
PyDoc_STRVAR(pyrna_prop_collection_keys_doc,
".. method:: keys()\n"
"\n"
" Return the identifiers of collection members (matching pythons dict.keys() functionality).\n"
" Return the identifiers of collection members\n"
" (matching pythons dict.keys() functionality).\n"
"\n"
" :return: the identifiers for each member of this collection.\n"
" :rtype: list of stings\n"
@ -3470,7 +3481,8 @@ static PyObject *pyrna_prop_collection_keys(BPy_PropertyRNA *self)
PyDoc_STRVAR(pyrna_prop_collection_items_doc,
".. method:: items()\n"
"\n"
" Return the identifiers of collection members (matching pythons dict.items() functionality).\n"
" Return the identifiers of collection members\n"
" (matching pythons dict.items() functionality).\n"
"\n"
" :return: (key, value) pairs for each member of this collection.\n"
" :rtype: list of tuples\n"
@ -3511,7 +3523,8 @@ static PyObject *pyrna_prop_collection_items(BPy_PropertyRNA *self)
PyDoc_STRVAR(pyrna_prop_collection_values_doc,
".. method:: values()\n"
"\n"
" Return the values of collection (matching pythons dict.values() functionality).\n"
" Return the values of collection\n"
" (matching pythons dict.values() functionality).\n"
"\n"
" :return: the members of this collection.\n"
" :rtype: list\n"
@ -3525,14 +3538,17 @@ static PyObject *pyrna_prop_collection_values(BPy_PropertyRNA *self)
PyDoc_STRVAR(pyrna_struct_get_doc,
".. method:: get(key, default=None)\n"
"\n"
" Returns the value of the custom property assigned to key or default when not found (matches pythons dictionary function of the same name).\n"
" Returns the value of the custom property assigned to key or default\n"
" when not found (matches pythons dictionary function of the same name).\n"
"\n"
" :arg key: The key assosiated with the custom property.\n"
" :type key: string\n"
" :arg default: Optional argument for the value to return if *key* is not found.\n"
" :arg default: Optional argument for the value to return if\n"
" *key* is not found.\n"
" :type default: Undefined\n"
"\n"
" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone` classes support custom properties.\n"
" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone`\n"
" classes support custom properties.\n"
);
static PyObject *pyrna_struct_get(BPy_StructRNA *self, PyObject *args)
{
@ -3571,7 +3587,8 @@ PyDoc_STRVAR(pyrna_struct_as_pointer_doc,
" :return: int (memory address).\n"
" :rtype: int\n"
"\n"
" .. note:: This is intended only for advanced script writers who need to pass blender data to their own C/Python modules.\n"
" .. note:: This is intended only for advanced script writers who need to\n"
" pass blender data to their own C/Python modules.\n"
);
static PyObject *pyrna_struct_as_pointer(BPy_StructRNA *self)
{
@ -3581,11 +3598,13 @@ static PyObject *pyrna_struct_as_pointer(BPy_StructRNA *self)
PyDoc_STRVAR(pyrna_prop_collection_get_doc,
".. method:: get(key, default=None)\n"
"\n"
" Returns the value of the item assigned to key or default when not found (matches pythons dictionary function of the same name).\n"
" Returns the value of the item assigned to key or default when not found\n"
" (matches pythons dictionary function of the same name).\n"
"\n"
" :arg key: The identifier for the collection member.\n"
" :type key: string\n"
" :arg default: Optional argument for the value to return if *key* is not found.\n"
" :arg default: Optional argument for the value to return if\n"
" *key* is not found.\n"
" :type default: Undefined\n"
);
static PyObject *pyrna_prop_collection_get(BPy_PropertyRNA *self, PyObject *args)
@ -6362,11 +6381,15 @@ void pyrna_free_types(void)
PyDoc_STRVAR(pyrna_register_class_doc,
".. method:: register_class(cls)\n"
"\n"
" Register a subclass of a blender type in (:class:`Panel`, :class:`Menu`, :class:`Header`, :class:`Operator`, :class:`KeyingSetInfo`, :class:`RenderEngine`).\n"
" Register a subclass of a blender type in (:class:`Panel`,\n"
" :class:`Menu`, :class:`Header`, :class:`Operator`,\n"
" :class:`KeyingSetInfo`, :class:`RenderEngine`).\n"
"\n"
" If the class has a *register* class method it will be called before registration.\n"
" If the class has a *register* class method it will be called\n"
" before registration.\n"
"\n"
" .. note:: :exc:`ValueError` exception is raised if the class is not a subclass of a registerable blender class.\n"
" .. note:: :exc:`ValueError` exception is raised if the class is not a\n"
" subclass of a registerable blender class.\n"
"\n"
);
PyMethodDef meth_bpy_register_class= {"register_class", pyrna_register_class, METH_O, pyrna_register_class_doc};
@ -6492,7 +6515,8 @@ PyDoc_STRVAR(pyrna_unregister_class_doc,
"\n"
" Unload the python class from blender.\n"
"\n"
" If the class has an *unregister* class method it will be called before unregistering.\n"
" If the class has an *unregister* class method it will be called\n"
" before unregistering.\n"
);
PyMethodDef meth_bpy_unregister_class= {"unregister_class", pyrna_unregister_class, METH_O, pyrna_unregister_class_doc};
static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_class)