From f87ca5f1c314f67353b6111d3647aef159dc07c6 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Thu, 18 Sep 2014 15:44:53 +0900 Subject: Fix for missing Freestyle sections in the Blender Python API documentation. Freestyle sections of the API docs were empty due to Freestyle module reorganization in commit rB6498b96ce7081db039354228213d72e8c70bd3aa. Module __all__ property was added to submodules so as to properly exclude irrelevant documentation elements such as mathutils.Vector. --- doc/python_api/sphinx_doc_gen.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 9ec8f9ad2c2..226b1ecd1f3 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -274,6 +274,12 @@ else: "mathutils.kdtree", "mathutils.noise", "freestyle", + "freestyle.chainingiterators", + "freestyle.functions", + "freestyle.predicates", + "freestyle.shaders", + "freestyle.types", + "freestyle.utils", ] # ------ @@ -316,7 +322,13 @@ try: __import__("freestyle") except ImportError: BPY_LOGGER.debug("Warning: Built without 'freestyle' module, docs incomplete...") - EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["freestyle"] + EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["freestyle", + "freestyle.chainingiterators", + "freestyle.functions", + "freestyle.predicates", + "freestyle.shaders", + "freestyle.types", + "freestyle.utils"] # examples EXAMPLES_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "examples")) @@ -1780,8 +1792,14 @@ def write_rst_importable_modules(basepath): "mathutils.geometry" : "Geometry Utilities", "mathutils.kdtree" : "KDTree Utilities", "mathutils.noise" : "Noise Utilities", - "freestyle" : "Freestyle Data Types & Operators", - } + "freestyle" : "Freestyle Module", + "freestyle.types" : "Freestyle Types", + "freestyle.predicates" : "Freestyle Predicates", + "freestyle.functions" : "Freestyle Functions", + "freestyle.chainingiterators" : "Freestyle Chaining Iterators", + "freestyle.shaders" : "Freestyle Shaders", + "freestyle.utils" : "Freestyle Utilities", + } for mod_name, mod_descr in importable_modules.items(): if mod_name not in EXCLUDE_MODULES: module = __import__(mod_name, -- cgit v1.2.3