From c40b976ea87bcbab01a8f939d20996ba1a465772 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 13 Oct 2011 06:59:09 +0000 Subject: [PATCH] py docs - gpu module wasn't included in docs. also added convenience target to build sphinx api docs: make doc_py --- GNUmakefile | 14 ++++++++++++++ doc/python_api/rst/gpu.rst | 6 ++++-- doc/python_api/sphinx_doc_gen.py | 10 ++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index aad3c58938c..f92b0093eae 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -145,6 +145,9 @@ help: @echo " * check_splint - run blenders source through splint (C only)" @echo " * check_sparse - run blenders source through sparse (C only)" @echo "" + @echo "Documentation Targets" + @echo " * doc_py - generate sphinx python api docs" + @echo "" # ----------------------------------------------------------------------------- # Packages @@ -222,6 +225,17 @@ check_sparse: cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py +# ----------------------------------------------------------------------------- +# Documentation +# + +# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation. +doc_py: + $(BUILD_DIR)/bin/blender --background --factory-startup --python doc/python_api/sphinx_doc_gen.py + cd doc/python_api ; sphinx-build -n -b html sphinx-in sphinx-out + @echo "docs written into: 'doc/python_api/sphinx-out/index.html'" + + clean: $(MAKE) -C $(BUILD_DIR) clean diff --git a/doc/python_api/rst/gpu.rst b/doc/python_api/rst/gpu.rst index 72a5dc2f5d3..2ca7fdda9d5 100644 --- a/doc/python_api/rst/gpu.rst +++ b/doc/python_api/rst/gpu.rst @@ -1,7 +1,10 @@ - GPU functions (gpu) =================== +.. module:: gpu + +This module provides access to materials GLSL shaders. + ***** Intro ***** @@ -16,7 +19,6 @@ and in the game engine. are are closely related to Blender's internal GLSL code and may change if the GLSL code is modified (e.g. new uniform type). -.. module:: gpu ********* Constants diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 8743a89057e..2ccf67e2db4 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -83,6 +83,7 @@ else: "aud", "bgl", "blf", + "gpu", "mathutils", "mathutils.geometry", ) @@ -1122,6 +1123,8 @@ def rna2sphinx(BASEPATH): fw(" bgl.rst\n\n") if "blf" not in EXCLUDE_MODULES: fw(" blf.rst\n\n") + if "gpu" not in EXCLUDE_MODULES: + fw(" gpu.rst\n\n") if "aud" not in EXCLUDE_MODULES: fw(" aud.rst\n\n") if "bpy_extras" not in EXCLUDE_MODULES: @@ -1262,6 +1265,13 @@ def rna2sphinx(BASEPATH): import shutil shutil.copy2(os.path.join(BASEPATH, "..", "rst", "bgl.rst"), BASEPATH) + if "gpu" not in EXCLUDE_MODULES: + #import gpu as module + #pymodule2sphinx(BASEPATH, "gpu", module, "GPU Shader Module") + #del module + import shutil + shutil.copy2(os.path.join(BASEPATH, "..", "rst", "gpu.rst"), BASEPATH) + if "aud" not in EXCLUDE_MODULES: import aud as module pymodule2sphinx(BASEPATH, "aud", module, "Audio System")