[Bf-blender-cvs] [92734d868b1] master: PyDoc: resolve bpy.types & bpy.ops expanding sub-modules inline

Campbell Barton noreply at git.blender.org
Fri Jan 20 04:04:57 CET 2023


Commit: 92734d868b1b046298bbcbdca4ab2039ec922e63
Author: Campbell Barton
Date:   Fri Jan 20 13:50:15 2023 +1100
Branches: master
https://developer.blender.org/rB92734d868b1b046298bbcbdca4ab2039ec922e63

PyDoc: resolve bpy.types & bpy.ops expanding sub-modules inline

The bpy.types page was unreasonably long (over 17k lines).
Resolve by setting the `maxdepth` for this and the `bpy.ops` page too.

This problem showed up in v3.4 release and may be caused by changes
to Sphinx's default behavior as there doesn't seem to be any change
that would cause this in the generated docs.

===================================================================

M	doc/python_api/sphinx_doc_gen.py

===================================================================

diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index b070a54407c..74bee60d662 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -2098,6 +2098,8 @@ def write_rst_types_index(basepath):
         fw(title_string("Types (bpy.types)", "="))
         fw(".. module:: bpy.types\n\n")
         fw(".. toctree::\n")
+        # Only show top-level entries (avoids unreasonably large pages).
+        fw("   :maxdepth: 1\n")
         fw("   :glob:\n\n")
         fw("   bpy.types.*\n\n")
 
@@ -2124,6 +2126,8 @@ def write_rst_ops_index(basepath):
         write_example_ref("", fw, "bpy.ops")
         fw(".. toctree::\n")
         fw("   :caption: Submodules\n")
+        # Only show top-level entries (avoids unreasonably large pages).
+        fw("   :maxdepth: 1\n")
         fw("   :glob:\n\n")
         fw("   bpy.ops.*\n\n")
         file.close()



More information about the Bf-blender-cvs mailing list