diff options
Diffstat (limited to 'source/blender/python/doc/sphinx_doc_gen.py')
-rw-r--r-- | source/blender/python/doc/sphinx_doc_gen.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/python/doc/sphinx_doc_gen.py b/source/blender/python/doc/sphinx_doc_gen.py index aa42c2f8a4a..69aa68acdc9 100644 --- a/source/blender/python/doc/sphinx_doc_gen.py +++ b/source/blender/python/doc/sphinx_doc_gen.py @@ -46,6 +46,7 @@ reload(rna_info) # lame, python wont give some access MethodDescriptorType = type(dict.get) GetSetDescriptorType = type(int.real) +StaticMethodType = type(staticmethod(lambda: None)) EXAMPLE_SET = set() EXAMPLE_SET_USED = set() @@ -153,7 +154,7 @@ def py_c_func2sphinx(ident, fw, identifier, py_func, is_class=True): fw("\n") else: fw(ident + ".. function:: %s()\n\n" % identifier) - fw(ident + " Undocumented function.\n\n" % identifier) + fw(ident + " Undocumented function.\n\n") def pyprop2sphinx(ident, fw, identifier, py_prop): @@ -253,6 +254,12 @@ def pymodule2sphinx(BASEPATH, module_name, module, title): if type(descr) == GetSetDescriptorType: py_descr2sphinx(" ", fw, descr, module_name, type_name, key) + for key, descr in descr_items: + if type(descr) == StaticMethodType: + descr = getattr(value, key) + write_indented_lines(" ", fw, descr.__doc__ or "Undocumented", False) + fw("\n") + fw("\n\n") file.close() @@ -350,6 +357,7 @@ def rna2sphinx(BASEPATH): fw(" mathutils.rst\n\n") + fw(" Freestyle.rst\n\n") fw(" blf.rst\n\n") # game engine @@ -404,6 +412,10 @@ def rna2sphinx(BASEPATH): pymodule2sphinx(BASEPATH, "mathutils", module, "Math Types & Utilities (mathutils)") del module + import Freestyle as module + pymodule2sphinx(BASEPATH, "Freestyle", module, "Freestyle Operators & Rules (Freestyle)") + del module + import blf as module pymodule2sphinx(BASEPATH, "blf", module, "Blender Font Drawing (blf)") del module |