diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-04-19 17:00:21 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-04-19 17:00:21 +0400 |
commit | eaf1e7a8881988ca158214d88d9b94e7dcdc8f81 (patch) | |
tree | fc5c2540d24654f7b9116f65a62ea553a62fb30b /doc/python_api | |
parent | c4dbd8bc4945483322af5110c099bff42ad6d6a9 (diff) |
Py API doc generation: add bpy.app.translations module, and fix a few errors found while building the doc. Thanks to Campbell for review.
Diffstat (limited to 'doc/python_api')
-rw-r--r-- | doc/python_api/rst_from_bmesh_opdefines.py | 5 | ||||
-rw-r--r-- | doc/python_api/sphinx_doc_gen.py | 38 | ||||
-rwxr-xr-x | doc/python_api/sphinx_doc_gen.sh | 2 |
3 files changed, 27 insertions, 18 deletions
diff --git a/doc/python_api/rst_from_bmesh_opdefines.py b/doc/python_api/rst_from_bmesh_opdefines.py index 3776ef7ce56..cf0420c3830 100644 --- a/doc/python_api/rst_from_bmesh_opdefines.py +++ b/doc/python_api/rst_from_bmesh_opdefines.py @@ -142,7 +142,10 @@ def main(): "BM_EDGE", "BM_FACE", - "BMO_OP_FLAG_UNTAN_MULTIRES", + "BMO_OPTYPE_FLAG_NORMALS_CALC", + "BMO_OPTYPE_FLAG_UNTAN_MULTIRES", + "BMO_OPTYPE_FLAG_SELECT_FLUSH", + "BMO_OPTYPE_FLAG_NOP", ) vars_dict = {} for i, v in enumerate(vars): diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 19f45f1bc68..d71c76b469c 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -250,6 +250,7 @@ else: "bmesh.utils", "bpy.app", "bpy.app.handlers", + "bpy.app.translations", "bpy.context", "bpy.data", "bpy.ops", # supports filtering @@ -857,7 +858,7 @@ def pymodule2sphinx(basepath, module_name, module, title): classes.append((attribute, value)) elif issubclass(value_type, types.ModuleType): submodules.append((attribute, value)) - elif value_type in (bool, int, float, str, tuple): + elif issubclass(value_type, (bool, int, float, str, tuple)): # constant, not much fun we can do here except to list it. # TODO, figure out some way to document these! fw(".. data:: %s\n\n" % attribute) @@ -1538,6 +1539,7 @@ def write_rst_contents(basepath): "bpy.path", "bpy.app", "bpy.app.handlers", + "bpy.app.translations", # C modules "bpy.props", @@ -1687,23 +1689,24 @@ def write_rst_importable_modules(basepath): ''' importable_modules = { # python_modules - "bpy.path" : "Path Utilities", - "bpy.utils" : "Utilities", - "bpy_extras" : "Extra Utilities", + "bpy.path" : "Path Utilities", + "bpy.utils" : "Utilities", + "bpy_extras" : "Extra Utilities", # C_modules - "aud" : "Audio System", - "blf" : "Font Drawing", - "bmesh" : "BMesh Module", - "bmesh.types" : "BMesh Types", - "bmesh.utils" : "BMesh Utilities", - "bpy.app" : "Application Data", - "bpy.app.handlers" : "Application Handlers", - "bpy.props" : "Property Definitions", - "mathutils" : "Math Types & Utilities", - "mathutils.geometry": "Geometry Utilities", - "mathutils.noise" : "Noise Utilities", - "freestyle" : "Freestyle Data Types & Operators", + "aud" : "Audio System", + "blf" : "Font Drawing", + "bmesh" : "BMesh Module", + "bmesh.types" : "BMesh Types", + "bmesh.utils" : "BMesh Utilities", + "bpy.app" : "Application Data", + "bpy.app.handlers" : "Application Handlers", + "bpy.app.translations" : "Application Translations", + "bpy.props" : "Property Definitions", + "mathutils" : "Math Types & Utilities", + "mathutils.geometry" : "Geometry Utilities", + "mathutils.noise" : "Noise Utilities", + "freestyle" : "Freestyle Data Types & Operators", } for mod_name, mod_descr in importable_modules.items(): if mod_name not in EXCLUDE_MODULES: @@ -1745,6 +1748,9 @@ def copy_handwritten_rsts(basepath): bge_types_dir = os.path.join(RST_DIR, "bge_types") for i in os.listdir(bge_types_dir): + if i.startswith("."): + # Avoid things like .svn dir... + continue shutil.copy2(os.path.join(bge_types_dir, i), basepath) # changelog diff --git a/doc/python_api/sphinx_doc_gen.sh b/doc/python_api/sphinx_doc_gen.sh index 14919f678be..9e069cb0540 100755 --- a/doc/python_api/sphinx_doc_gen.sh +++ b/doc/python_api/sphinx_doc_gen.sh @@ -1,6 +1,6 @@ #!/bin/sh # run from the blender source dir -# bash source/blender/python/doc/sphinx_doc_gen.sh +# bash doc/python_api/sphinx_doc_gen.sh # ssh upload means you need an account on the server |