From 7a1f092cac4b40e06742af52577c7f7c36cb4a28 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Sat, 23 Oct 2010 11:11:56 +0000 Subject: [PATCH] Restored Freestyle documentation that was lost during the last merge. --- doc/python_api/sphinx_doc_gen.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 7a78816a2db..41ea3405513 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -57,6 +57,7 @@ reload(rna_info) ClassMethodDescriptorType = type(dict.__dict__['fromkeys']) MethodDescriptorType = type(dict.get) GetSetDescriptorType = type(int.real) +StaticMethodType = type(staticmethod(lambda: None)) EXAMPLE_SET = set() EXAMPLE_SET_USED = set() @@ -291,6 +292,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() @@ -395,6 +402,7 @@ def rna2sphinx(BASEPATH): fw(" mathutils.rst\n\n") + fw(" Freestyle.rst\n\n") fw(" blf.rst\n\n") fw(" aud.rst\n\n") @@ -476,6 +484,10 @@ def rna2sphinx(BASEPATH): pymodule2sphinx(BASEPATH, "mathutils", module, "Math Types & Utilities (mathutils)") del module + import Freestyle as module + pymodule2sphinx(BASEPATH, "Freestyle", module, "Freestyle Data Types & Operators (Freestyle)") + del module + import blf as module pymodule2sphinx(BASEPATH, "blf", module, "Font Drawing (blf)") del module