Doc: correct rst syntax
also remove some API docs from example
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user