From 1f7bcf25447c8b2e2881d10d46f41d493c20cc09 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Mon, 19 Jul 2010 13:36:10 +0000 Subject: [PATCH] Minor sphinx corrections: * Attributes starting with _ in classes are now ignored * sphinx.blend updated so that it doesn't have to be edited anymore if the script changes --- source/blender/python/doc/sphinx_doc_gen.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/blender/python/doc/sphinx_doc_gen.py b/source/blender/python/doc/sphinx_doc_gen.py index e38aa41a7da..145b6c3c312 100644 --- a/source/blender/python/doc/sphinx_doc_gen.py +++ b/source/blender/python/doc/sphinx_doc_gen.py @@ -143,7 +143,9 @@ def pyfunc2sphinx(ident, fw, identifier, py_func, is_class=True): def py_descr2sphinx(ident, fw, descr, module_name, type_name, identifier): - + if identifier.startswith("_"): + return + doc = descr.__doc__ if not doc: doc = undocumented_message(module_name, type_name, identifier) @@ -772,7 +774,8 @@ def rna2sphinx(BASEPATH): file.close() -if __name__ == '__main__': +def main(): + import bpy if 'bpy' not in dir(): print("\nError, this script must run from inside blender2.5") print(script_help_msg) @@ -842,3 +845,6 @@ if __name__ == '__main__': import sys sys.exit() + +if __name__ == '__main__': + main()