[Bf-blender-cvs] [d2d1cbb] temp-pyapi-units: Fix doc strings.
Bastien Montagne
noreply at git.blender.org
Tue Jun 17 12:09:25 CEST 2014
Commit: d2d1cbbd290c41b08b7c8fbd1936d08b45d7e207
Author: Bastien Montagne
Date: Tue Jun 17 12:03:34 2014 +0200
https://developer.blender.org/rBd2d1cbbd290c41b08b7c8fbd1936d08b45d7e207
Fix doc strings.
===================================================================
M source/blender/python/intern/bpy_utils_units.c
===================================================================
diff --git a/source/blender/python/intern/bpy_utils_units.c b/source/blender/python/intern/bpy_utils_units.c
index 68d6b0f..c8d728f 100644
--- a/source/blender/python/intern/bpy_utils_units.c
+++ b/source/blender/python/intern/bpy_utils_units.c
@@ -121,7 +121,6 @@ static PyObject *py_structseq_from_strings(
/* end sentinel */
desc->name = desc->doc = NULL;
-
PyStructSequence_InitType(py_type, py_sseq_desc);
/* initialize pytype */
@@ -133,7 +132,6 @@ static PyObject *py_structseq_from_strings(
}
return py_struct_seq;
-
}
static bool bpyunits_validate(const char *usys_str, const char *ucat_str, int *r_usys, int *r_ucat)
@@ -169,12 +167,15 @@ PyDoc_STRVAR(bpyunits_to_value_doc,
"\n"
" Convert a given input string into a float value.\n"
"\n"
-" :arg str unit_system: The unit system, from :attr:`bpy.utils.units.systems`.\n"
-" :arg str unit_category: The category of data we are converting (length, area, rotation, etc.), "
+" :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.), "
" from :attr:`bpy.utils.units.categories`.\n"
-" :arg str str_input: The string to convert to a float value.\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"
-" :type: string or None\n"
+" :type str_ref_unit: string or None\n"
" :return: The converted/interpreted value.\n"
" :rtype: float\n"
" :raises ValueError: if conversion fails to generate a valid python float value.\n"
@@ -230,13 +231,19 @@ PyDoc_STRVAR(bpyunits_to_string_doc,
"\n"
" Convert a given input float value into a string with units.\n"
"\n"
-" :arg str unit_system: The unit system, from :attr:`bpy.utils.units.systems`.\n"
-" :arg str unit_category: The category of data we are converting (length, area, rotation, etc.), "
+" :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.), "
" from :attr:`bpy.utils.units.categories`.\n"
-" :arg float value: The value to convert to a string.\n"
-" :arg int precision: Number of digits after the comma.\n"
-" :arg bool split_unit: Whether to use several units if needed (1m1cm), or always only one (1.01m).\n"
-" :arg bool compatible_unit: Whether to use keyboard-friendly units (1m2) or nicer utf-8 ones (1m²).\n"
+" :type unit_category: string\n"
+" :arg value: The value to convert to a string.\n"
+" :type value: float\n"
+" :arg precision: Number of digits after the comma.\n"
+" :type precision: int\n"
+" :arg split_unit: Whether to use several units if needed (1m1cm), or always only one (1.01m).\n"
+" :type split_unit: bool\n"
+" :arg compatible_unit: Whether to use keyboard-friendly units (1m2) or nicer utf-8 ones (1m²).\n"
+" :type compatible_unit: bool\n"
" :return: The converted string.\n"
" :rtype: str\n"
" :raises ValueError: if conversion fails to generate a valid python string.\n"
More information about the Bf-blender-cvs
mailing list