diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 3b6c3c65988..f698c28712f 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -32,10 +32,10 @@ API dump in RST files providing ./blender.bin is or links to the blender executable To choose sphinx-in directory: - ./blender.bin --background --python doc/python_api/sphinx_doc_gen.py -- -o ../python_api + ./blender.bin --background --python doc/python_api/sphinx_doc_gen.py -- --output ../python_api For quick builds: - ./blender.bin --background --python doc/python_api/sphinx_doc_gen.py -- -p + ./blender.bin --background --python doc/python_api/sphinx_doc_gen.py -- --partial Sphinx: HTML generation @@ -415,7 +415,6 @@ else: def is_struct_seq(value): return isinstance(value, tuple) and type(tuple) != tuple and hasattr(value, "n_fields") - def undocumented_message(module_name, type_name, identifier): if str(type_name).startswith('\n\n" % (info_desc, info)) fw("\n") - fw("===================\n") - fw("Application Modules\n") - fw("===================\n") - fw("\n") + fw(title_string("Application Modules", "=", double=True)) fw(".. toctree::\n") fw(" :maxdepth: 1\n\n") @@ -1436,10 +1431,7 @@ def write_rst_contents(basepath): if mod not in EXCLUDE_MODULES: fw(" %s\n\n" % mod) - fw("==================\n") - fw("Standalone Modules\n") - fw("==================\n") - fw("\n") + fw(title_string("Standalone Modules", "=", double=True)) fw(".. toctree::\n") fw(" :maxdepth: 1\n\n") @@ -1457,10 +1449,7 @@ def write_rst_contents(basepath): # game engine if "bge" not in EXCLUDE_MODULES: - fw("===================\n") - fw("Game Engine Modules\n") - fw("===================\n") - fw("\n") + fw(title_string("Game Engine Modules", "=", double=True)) fw(".. toctree::\n") fw(" :maxdepth: 1\n\n") fw(" bge.types.rst\n\n") @@ -1471,10 +1460,7 @@ def write_rst_contents(basepath): fw(" bge.constraints.rst\n\n") # rna generated change log - fw("========\n") - fw("API Info\n") - fw("========\n") - fw("\n") + fw(title_string("API Info", "=", double=True)) fw(".. toctree::\n") fw(" :maxdepth: 1\n\n") fw(" change_log.rst\n\n") @@ -1510,7 +1496,7 @@ def write_rst_bpy(basepath): title = ":mod:`bpy` --- Blender Python Module" - write_title(fw, title, "=") + fw(title_string(title, "=")) fw(".. module:: bpy.types\n\n") file.close() @@ -1524,8 +1510,7 @@ def write_rst_types_index(basepath): filepath = os.path.join(basepath, "bpy.types.rst") file = open(filepath, "w", encoding="utf-8") fw = file.write - fw("Types (bpy.types)\n") - fw("=================\n\n") + fw(title_string("Types (bpy.types)", "=")) fw(".. toctree::\n") fw(" :glob:\n\n") fw(" bpy.types.*\n\n") @@ -1540,8 +1525,7 @@ def write_rst_ops_index(basepath): filepath = os.path.join(basepath, "bpy.ops.rst") file = open(filepath, "w", encoding="utf-8") fw = file.write - fw("Operators (bpy.ops)\n") - fw("===================\n\n") + fw(title_string("Operators (bpy.ops)", "=")) write_example_ref("", fw, "bpy.ops") fw(".. toctree::\n") fw(" :glob:\n\n") @@ -1559,8 +1543,7 @@ def write_rst_data(basepath): filepath = os.path.join(basepath, "bpy.data.rst") file = open(filepath, "w", encoding="utf-8") fw = file.write - fw("Data Access (bpy.data)\n") - fw("======================\n\n") + fw(title_string("Data Access (bpy.data)", "=")) fw(".. module:: bpy\n") fw("\n") fw("This module is used for all blender/python access.\n")