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:
authorCampbell Barton <ideasman42@gmail.com>2010-04-10 00:43:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-10 00:43:58 +0400
commitc3ab6bc509b4a322e66b59fd9c12b9954f851b66 (patch)
tree952363a7aaed9b0c9d4fa972084a41fd4f67e5a1 /source/blender/python/doc/sphinx_doc_gen.py
parentc169c5ddfe256694c1f4a0929bbca50a05672a67 (diff)
rna reference docs, list inherited properties and functions at the bottom of each type.
Diffstat (limited to 'source/blender/python/doc/sphinx_doc_gen.py')
-rw-r--r--source/blender/python/doc/sphinx_doc_gen.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/source/blender/python/doc/sphinx_doc_gen.py b/source/blender/python/doc/sphinx_doc_gen.py
index 37bc123ee53..9a5294bed82 100644
--- a/source/blender/python/doc/sphinx_doc_gen.py
+++ b/source/blender/python/doc/sphinx_doc_gen.py
@@ -488,6 +488,44 @@ def rna2sphinx(BASEPATH):
write_example_ref(" ", fw, struct.identifier + "." + attribute)
fw("\n")
+ lines = []
+
+ if struct.base:
+ bases = list(reversed(struct.get_bases()))
+
+ # props
+ lines[:] = []
+ for base in bases:
+ for prop in base.properties:
+ lines.append("* :class:`%s.%s`\n" % (base.identifier, prop.identifier))
+
+ for identifier, py_prop in base.get_py_properties():
+ lines.append("* :class:`%s.%s`\n" % (base.identifier, identifier))
+
+ if lines:
+ fw(".. rubric:: Inherited Properties\n\n")
+ for line in lines:
+ fw(line)
+ fw("\n")
+
+
+ # funcs
+ lines[:] = []
+ 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))
+
+ if lines:
+ fw(".. rubric:: Inherited Functions\n\n")
+ for line in lines:
+ fw(line)
+ fw("\n")
+
+ lines[:] = []
+
+
if struct.references:
# use this otherwise it gets in the index for a normal heading.
fw(".. rubric:: References\n\n")