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
diff options
context:
space:
mode:
Diffstat (limited to 'doc/python_api/sphinx_doc_gen.py')
-rw-r--r--doc/python_api/sphinx_doc_gen.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 60058d5d17f..b47b59b473d 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1756,6 +1756,7 @@ def write_rst_contents(basepath):
app_modules = (
"bpy.context", # note: not actually a module
"bpy.data", # note: not actually a module
+ "bpy.msgbus", # note: not actually a module
"bpy.ops",
"bpy.types",
@@ -1846,6 +1847,29 @@ def write_rst_ops_index(basepath):
file.close()
+def write_rst_msgbus(basepath):
+ """
+ Write the rst files of bpy.msgbus module
+ """
+ if 'bpy.msgbus' in EXCLUDE_MODULES:
+ return
+
+ # Write the index.
+ filepath = os.path.join(basepath, "bpy.msgbus.rst")
+ file = open(filepath, "w", encoding="utf-8")
+ fw = file.write
+ fw(title_string("Message Bus (bpy.msgbus)", "="))
+ write_example_ref("", fw, "bpy.msgbus")
+ fw(".. toctree::\n")
+ fw(" :glob:\n\n")
+ fw(" bpy.msgbus.*\n\n")
+ file.close()
+
+ # Write the contents.
+ pymodule2sphinx(basepath, 'bpy.msgbus', bpy.msgbus, 'Message Bus')
+ EXAMPLE_SET_USED.add("bpy.msgbus")
+
+
def write_rst_data(basepath):
'''
Write the rst file of bpy.data module
@@ -2000,6 +2024,7 @@ def rna2sphinx(basepath):
write_rst_bpy(basepath) # bpy, disabled by default
write_rst_types_index(basepath) # bpy.types
write_rst_ops_index(basepath) # bpy.ops
+ write_rst_msgbus(basepath) # bpy.msgbus
pyrna2sphinx(basepath) # bpy.types.* and bpy.ops.*
write_rst_data(basepath) # bpy.data
write_rst_importable_modules(basepath)