[Bf-blender-cvs] [7f28fd59734] arcpatch-D9139: Fix class links

Aaron Carlisle noreply at git.blender.org
Wed Oct 7 21:33:46 CEST 2020


Commit: 7f28fd59734f34a29b55bb8535dddd96d16c8762
Author: Aaron Carlisle
Date:   Wed Oct 7 14:21:39 2020 -0400
Branches: arcpatch-D9139
https://developer.blender.org/rB7f28fd59734f34a29b55bb8535dddd96d16c8762

Fix class links

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

M	doc/python_api/rst/bgl.rst
M	doc/python_api/sphinx_doc_gen.py

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

diff --git a/doc/python_api/rst/bgl.rst b/doc/python_api/rst/bgl.rst
index 0c40f2092a8..36333919309 100644
--- a/doc/python_api/rst/bgl.rst
+++ b/doc/python_api/rst/bgl.rst
@@ -21,8 +21,8 @@ offers a set of extensive examples, including advanced features.
 
 .. note::
 
-   You can use the :class:`Image` type to load and set textures.
-   See :class:`Image.gl_load` and :class:`Image.gl_free`,
+   You can use the :class:`bpy.types.Image` type to load and set textures.
+   See :class:`bpy.types.Image.gl_load` and :class:`bpy.types.Image.gl_free`,
    for example.
 
 
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index f4fad758523..99bac2163a9 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1328,7 +1328,7 @@ def pyrna2sphinx(basepath):
             else:
                 fw("base class --- ")
 
-            fw(", ".join((":class:`%s`" % base_id) for base_id in base_ids))
+            fw(", ".join((":class:`%s.%s`" % (struct_module_name, base_id)) for base_id in base_ids))
             fw("\n\n")
 
         subclass_ids = [
@@ -1338,7 +1338,7 @@ def pyrna2sphinx(basepath):
         ]
         subclass_ids.sort()
         if subclass_ids:
-            fw("subclasses --- \n" + ", ".join((":class:`%s`" % s) for s in subclass_ids) + "\n\n")
+            fw("subclasses --- \n" + ", ".join((":class:`%s.%s`" % (struct_module_name, s)) for s in subclass_ids) + "\n\n")
 
         base_id = getattr(struct.base, "identifier", "")
 
@@ -1455,14 +1455,14 @@ def pyrna2sphinx(basepath):
             if _BPY_STRUCT_FAKE:
                 for key, descr in descr_items:
                     if type(descr) == GetSetDescriptorType:
-                        lines.append("   * :class:`%s.%s`\n" % (_BPY_STRUCT_FAKE, key))
+                        lines.append("   * :class:`%s.%s <%s.%s.%s>`\n" % (_BPY_STRUCT_FAKE, key, struct_module_name, _BPY_STRUCT_FAKE, key))
 
             for base in bases:
                 for prop in base.properties:
-                    lines.append("   * :class:`%s.%s`\n" % (base.identifier, prop.identifier))
+                    lines.append("   * :class`%s.%s. <%s.%s.%s>`\n" % (base.identifier, prop.identifier, struct_module_name, base.identifier, prop.identifier))
 
                 for identifier, py_prop in base.get_py_properties():
-                    lines.append("   * :class:`%s.%s`\n" % (base.identifier, identifier))
+                    lines.append("   * :class:`%s.%s <%s.%s.%s>`\n" % (base.identifier, identifier, struct_module_name, base.identifier, identifier))
 
             if lines:
                 fw(".. rubric:: Inherited Properties\n\n")
@@ -1480,15 +1480,15 @@ def pyrna2sphinx(basepath):
             if _BPY_STRUCT_FAKE:
                 for key, descr in descr_items:
                     if type(descr) == MethodDescriptorType:
-                        lines.append("   * :class:`%s.%s`\n" % (_BPY_STRUCT_FAKE, key))
+                        lines.append("   * :class:`%s.%s <%s.%s.%s>`\n" % (_BPY_STRUCT_FAKE, key, struct_module_name, _BPY_STRUCT_FAKE, key))
 
             for base in bases:
                 for func in base.functions:
                     lines.append("   * :class:`%s.%s`\n" % (base.identifier, func.identifier))
                 for identifier, py_func in base.get_py_functions():
-                    lines.append("   * :class:`%s.%s`\n" % (base.identifier, identifier))
+                    lines.append("   * :class:`%s.%s <%s.%s.%s>`\n" % (base.identifier, identifier, struct_module_name, base.identifier, identifier))
                 for identifier, py_func in base.get_py_c_functions():
-                    lines.append("   * :class:`%s.%s`\n" % (base.identifier, identifier))
+                    lines.append("   * :class:`%s.%s <%s.%s.%s>`\n" % (base.identifier, identifier, struct_module_name, base.identifier, identifier))
 
             if lines:
                 fw(".. rubric:: Inherited Functions\n\n")
@@ -1520,7 +1520,7 @@ def pyrna2sphinx(basepath):
                 ref_split = ref.split(".")
                 if len(ref_split) > 2:
                     ref = ref_split[-2] + "." + ref_split[-1]
-                fw("   * :class:`%s`\n" % ref)
+                fw("   * :class:`%s.%s`\n" % (struct_module_name, ref))
             fw("\n")
 
         # docs last?, disable for now
@@ -1551,7 +1551,7 @@ def pyrna2sphinx(basepath):
                     if not rna_info.rna_id_ignore(s.identifier)
                 ]
                 if subclass_ids:
-                    fw("subclasses --- \n" + ", ".join((":class:`%s`" % s) for s in sorted(subclass_ids)) + "\n\n")
+                    fw("subclasses --- \n" + ", ".join((":class:`%s`" % struct_module_name, s) for s in sorted(subclass_ids)) + "\n\n")
 
             fw(".. class:: %s\n\n" % class_name)
             fw("   %s\n\n" % descr_str)



More information about the Bf-blender-cvs mailing list