sphinx docstrng formatting (some lines were getting really long)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user