diff options
Diffstat (limited to 'doc/python_api/sphinx_doc_gen.py')
-rw-r--r-- | doc/python_api/sphinx_doc_gen.py | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index f8561c719bc..6d29c57c91f 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -60,11 +60,13 @@ if __import__("sys").modules.get("bpy") is None: # Switch for quick testing if 1: # full build + EXCLUDE_INFO_DOCS = False EXCLUDE_MODULES = () FILTER_BPY_TYPES = None FILTER_BPY_OPS = None else: + EXCLUDE_INFO_DOCS = False # for testing so doc-builds dont take so long. EXCLUDE_MODULES = ( "bpy.context", @@ -77,7 +79,7 @@ else: "bpy.types", # supports filtering "bpy.ops", # supports filtering "bpy_extras", - # "bge", + "bge", "aud", "bgl", "blf", @@ -85,7 +87,7 @@ else: "mathutils.geometry", ) - FILTER_BPY_TYPES = ("bpy_struct", "Panel", "Menu", "Operator", "RenderEngine") # allow + FILTER_BPY_TYPES = ("bpy_struct", "Panel", "ID") # allow FILTER_BPY_OPS = ("import.scene", ) # allow # for quick rebuilds @@ -96,6 +98,13 @@ sphinx-build doc/python_api/sphinx-in doc/python_api/sphinx-out """ +# extra info, not api reference docs +# stored in ./rst/info/ +INFO_DOCS = ( + ("info_quickstart.rst", "Blender/Python Quickstart: new to blender/scripting and want to get you're feet wet?"), + ("info_overview.rst", "Blender/Python API Overview: a more complete explanation of python integration"), + ("info_gotcha.rst", "Gotcha's: some of the problems you may come up against when writing scripts"), + ) # import rpdb2; rpdb2.start_embedded_debugger('test') @@ -744,6 +753,8 @@ def pyrna2sphinx(BASEPATH): descr = prop.name fw(" `%s`, %s, %s\n\n" % (prop.identifier, descr, type_descr)) + write_example_ref(" ", fw, "bpy.types." + struct.identifier + "." + func.identifier) + fw("\n") # python methods @@ -999,14 +1010,17 @@ def rna2sphinx(BASEPATH): fw("\n") - fw("============================\n") - fw("Blender/Python Documentation\n") - fw("============================\n") - fw("\n") - fw("\n") - fw("* `Quickstart Intro <http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro>`_ if you are new to scripting in blender and want to get you're feet wet!\n") - fw("* `Blender/Python Overview <http://wiki.blender.org/index.php/Dev:2.5/Py/API/Overview>`_ for a more complete explanation of python integration in blender\n") - fw("\n") + if not EXCLUDE_INFO_DOCS: + fw("============================\n") + fw("Blender/Python Documentation\n") + fw("============================\n") + fw("\n") + fw("\n") + fw(".. toctree::\n") + fw(" :maxdepth: 1\n\n") + for info, info_desc in INFO_DOCS: + fw(" %s <%s>\n\n" % (info_desc, info)) + fw("\n") fw("===================\n") fw("Application Modules\n") @@ -1208,6 +1222,11 @@ def rna2sphinx(BASEPATH): shutil.copy2(os.path.join(BASEPATH, "..", "rst", "change_log.rst"), BASEPATH) + + if not EXCLUDE_INFO_DOCS: + for info, info_desc in INFO_DOCS: + shutil.copy2(os.path.join(BASEPATH, "..", "rst", info), BASEPATH) + if 0: filepath = os.path.join(BASEPATH, "bpy.rst") file = open(filepath, "w") |