Py API doc generation: add bpy.app.translations module, and fix a few errors found while building the doc. Thanks to Campbell for review.

This commit is contained in:
Bastien Montagne
2013-04-19 13:00:21 +00:00
parent c4dbd8bc49
commit eaf1e7a888
3 changed files with 27 additions and 18 deletions

View File

@@ -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):

View File

@@ -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",
@@ -1699,6 +1701,7 @@ def write_rst_importable_modules(basepath):
"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",
@@ -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

View File

@@ -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