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-12-06 15:36:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-06 15:36:55 +0300
commit25bd57b0a1512037070d9e6c85694ab8fa82ec1b (patch)
treefa3aecae72fab58003dd7c624e11892a1b0de1a2 /doc/python_api
parentd64f46e0bbdd390b2b5487f09638402e7bdfe0e4 (diff)
include getset's for generating module docs.
used for bpy.debug/tempdir/driver_namespace which were previously undocumented.
Diffstat (limited to 'doc/python_api')
-rw-r--r--doc/python_api/sphinx_doc_gen.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index c1e614aa23f..1353dcf70d7 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -224,6 +224,16 @@ def pymodule2sphinx(BASEPATH, module_name, module, title):
# write members of the module
# only tested with PyStructs which are not exactly modules
for key, descr in sorted(type(module).__dict__.items()):
+ if key.startswith("__"):
+ continue
+ # naughty, we also add getset's into PyStructs, this is not typical py but also not incorrect.
+ if type(descr) == types.GetSetDescriptorType: # 'bpy_app_type' name is only used for examples and messages
+ py_descr2sphinx("", fw, descr, module_name, "bpy_app_type", key)
+ attribute_set.add(key)
+ for key, descr in sorted(type(module).__dict__.items()):
+ if key.startswith("__"):
+ continue
+
if type(descr) == types.MemberDescriptorType:
if descr.__doc__:
fw(".. data:: %s\n\n" % key)