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
path: root/doc
diff options
context:
space:
mode:
authorAaron Carlisle <carlisle.b3d@gmail.com>2020-10-08 08:20:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-08 08:27:42 +0300
commitfb20efae596565e4498fd0ea0ba310d977bab274 (patch)
treeefe097fa4172cd66db706b31c82fb50839d46638 /doc
parentd37fccab2632cabb398038820e7a549deaa7b937 (diff)
PyDoc: fix most of the sphinx-build warnings
Use `.. currentmodule::` instead of `.. module::` for `bpy.types` and `bpy.ops`. This change fixes most of the errors. Ref D9139
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/sphinx_doc_gen.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index af7461263c8..38cc9ea8528 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1311,7 +1311,7 @@ def pyrna2sphinx(basepath):
fw(title_string(title, "="))
- fw(".. module:: %s\n\n" % struct_module_name)
+ fw(".. currentmodule:: %s\n\n" % struct_module_name)
# docs first?, ok
write_example_ref("", fw, "%s.%s" % (struct_module_name, struct_id))
@@ -1542,8 +1542,7 @@ def pyrna2sphinx(basepath):
fw(title_string(class_name, "="))
- fw(".. module:: %s\n" % class_module_name)
- fw("\n")
+ fw(".. currentmodule:: %s\n\n" % class_module_name)
if use_subclasses:
subclass_ids = [
@@ -1853,6 +1852,7 @@ def write_rst_types_index(basepath):
file = open(filepath, "w", encoding="utf-8")
fw = file.write
fw(title_string("Types (bpy.types)", "="))
+ fw(".. module:: bpy.types\n\n")
fw(".. toctree::\n")
fw(" :glob:\n\n")
fw(" bpy.types.*\n\n")
@@ -1868,6 +1868,7 @@ def write_rst_ops_index(basepath):
file = open(filepath, "w", encoding="utf-8")
fw = file.write
fw(title_string("Operators (bpy.ops)", "="))
+ fw(".. module:: bpy.ops\n\n")
write_example_ref("", fw, "bpy.ops")
fw(".. toctree::\n")
fw(" :glob:\n\n")
@@ -1909,7 +1910,7 @@ def write_rst_data(basepath):
file = open(filepath, "w", encoding="utf-8")
fw = file.write
fw(title_string("Data Access (bpy.data)", "="))
- fw(".. module:: bpy\n")
+ fw(".. module:: bpy.data\n")
fw("\n")
fw("This module is used for all Blender/Python access.\n")
fw("\n")