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:
@@ -142,7 +142,10 @@ def main():
|
|||||||
"BM_EDGE",
|
"BM_EDGE",
|
||||||
"BM_FACE",
|
"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 = {}
|
vars_dict = {}
|
||||||
for i, v in enumerate(vars):
|
for i, v in enumerate(vars):
|
||||||
|
@@ -250,6 +250,7 @@ else:
|
|||||||
"bmesh.utils",
|
"bmesh.utils",
|
||||||
"bpy.app",
|
"bpy.app",
|
||||||
"bpy.app.handlers",
|
"bpy.app.handlers",
|
||||||
|
"bpy.app.translations",
|
||||||
"bpy.context",
|
"bpy.context",
|
||||||
"bpy.data",
|
"bpy.data",
|
||||||
"bpy.ops", # supports filtering
|
"bpy.ops", # supports filtering
|
||||||
@@ -857,7 +858,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
|
|||||||
classes.append((attribute, value))
|
classes.append((attribute, value))
|
||||||
elif issubclass(value_type, types.ModuleType):
|
elif issubclass(value_type, types.ModuleType):
|
||||||
submodules.append((attribute, value))
|
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.
|
# constant, not much fun we can do here except to list it.
|
||||||
# TODO, figure out some way to document these!
|
# TODO, figure out some way to document these!
|
||||||
fw(".. data:: %s\n\n" % attribute)
|
fw(".. data:: %s\n\n" % attribute)
|
||||||
@@ -1538,6 +1539,7 @@ def write_rst_contents(basepath):
|
|||||||
"bpy.path",
|
"bpy.path",
|
||||||
"bpy.app",
|
"bpy.app",
|
||||||
"bpy.app.handlers",
|
"bpy.app.handlers",
|
||||||
|
"bpy.app.translations",
|
||||||
|
|
||||||
# C modules
|
# C modules
|
||||||
"bpy.props",
|
"bpy.props",
|
||||||
@@ -1687,23 +1689,24 @@ def write_rst_importable_modules(basepath):
|
|||||||
'''
|
'''
|
||||||
importable_modules = {
|
importable_modules = {
|
||||||
# python_modules
|
# python_modules
|
||||||
"bpy.path" : "Path Utilities",
|
"bpy.path" : "Path Utilities",
|
||||||
"bpy.utils" : "Utilities",
|
"bpy.utils" : "Utilities",
|
||||||
"bpy_extras" : "Extra Utilities",
|
"bpy_extras" : "Extra Utilities",
|
||||||
|
|
||||||
# C_modules
|
# C_modules
|
||||||
"aud" : "Audio System",
|
"aud" : "Audio System",
|
||||||
"blf" : "Font Drawing",
|
"blf" : "Font Drawing",
|
||||||
"bmesh" : "BMesh Module",
|
"bmesh" : "BMesh Module",
|
||||||
"bmesh.types" : "BMesh Types",
|
"bmesh.types" : "BMesh Types",
|
||||||
"bmesh.utils" : "BMesh Utilities",
|
"bmesh.utils" : "BMesh Utilities",
|
||||||
"bpy.app" : "Application Data",
|
"bpy.app" : "Application Data",
|
||||||
"bpy.app.handlers" : "Application Handlers",
|
"bpy.app.handlers" : "Application Handlers",
|
||||||
"bpy.props" : "Property Definitions",
|
"bpy.app.translations" : "Application Translations",
|
||||||
"mathutils" : "Math Types & Utilities",
|
"bpy.props" : "Property Definitions",
|
||||||
"mathutils.geometry": "Geometry Utilities",
|
"mathutils" : "Math Types & Utilities",
|
||||||
"mathutils.noise" : "Noise Utilities",
|
"mathutils.geometry" : "Geometry Utilities",
|
||||||
"freestyle" : "Freestyle Data Types & Operators",
|
"mathutils.noise" : "Noise Utilities",
|
||||||
|
"freestyle" : "Freestyle Data Types & Operators",
|
||||||
}
|
}
|
||||||
for mod_name, mod_descr in importable_modules.items():
|
for mod_name, mod_descr in importable_modules.items():
|
||||||
if mod_name not in EXCLUDE_MODULES:
|
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")
|
bge_types_dir = os.path.join(RST_DIR, "bge_types")
|
||||||
|
|
||||||
for i in os.listdir(bge_types_dir):
|
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)
|
shutil.copy2(os.path.join(bge_types_dir, i), basepath)
|
||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# run from the blender source dir
|
# 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
|
# ssh upload means you need an account on the server
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user