Merging r51923 through r52851 from trunk into soc-2011-tomato

This commit is contained in:
2012-12-10 15:18:00 +00:00
parent da24aa8d10
commit b1afaa8312
978 changed files with 32475 additions and 17107 deletions
+26 -7
View File
@@ -35,7 +35,7 @@ API dump in RST files
./blender.bin --background --python doc/python_api/sphinx_doc_gen.py -- --output ../python_api
For quick builds:
./blender.bin --background --python doc/python_api/sphinx_doc_gen.py -- --partial
./blender.bin --background --python doc/python_api/sphinx_doc_gen.py -- --partial bmesh.*
Sphinx: HTML generation
@@ -245,6 +245,7 @@ else:
"bgl",
"blf",
"bmesh",
"bmesh.ops",
"bmesh.types",
"bmesh.utils",
"bpy.app",
@@ -297,7 +298,7 @@ try:
__import__("aud")
except ImportError:
BPY_LOGGER.debug("Warning: Built without 'aud' module, docs incomplete...")
EXCLUDE_MODULES = EXCLUDE_MODULES + ("aud", )
EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["aud"]
# examples
EXAMPLES_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "examples"))
@@ -315,6 +316,8 @@ RST_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "rst"))
INFO_DOCS = (
("info_quickstart.rst", "Blender/Python Quickstart: new to blender/scripting and want to get your feet wet?"),
("info_overview.rst", "Blender/Python API Overview: a more complete explanation of python integration"),
("info_tutorial_addon.rst", "Blender/Python Addon Tutorial: a step by step guide on how to write an addon from scratch"),
("info_api_reference.rst", "Blender/Python API Reference Usage: examples of how to use the API reference docs"),
("info_best_practice.rst", "Best Practice: Conventions to follow for writing good scripts"),
("info_tips_and_tricks.rst", "Tips and Tricks: Hints to help you while writing scripts for blender"),
("info_gotcha.rst", "Gotcha's: some of the problems you may come up against when writing scripts"),
@@ -1251,7 +1254,7 @@ def pyrna2sphinx(basepath):
bases = list(reversed(struct.get_bases()))
# props
lines[:] = []
del lines[:]
if _BPY_STRUCT_FAKE:
descr_items = [(key, descr) for key, descr in sorted(bpy.types.Struct.__bases__[0].__dict__.items()) if not key.startswith("__")]
@@ -1282,7 +1285,7 @@ def pyrna2sphinx(basepath):
fw("\n")
# funcs
lines[:] = []
del lines[:]
if _BPY_STRUCT_FAKE:
for key, descr in descr_items:
@@ -1305,7 +1308,7 @@ def pyrna2sphinx(basepath):
fw(line)
fw("\n")
lines[:] = []
del lines[:]
if struct.references:
# use this otherwise it gets in the index for a normal heading.
@@ -1472,6 +1475,11 @@ def write_sphinx_conf_py(basepath):
file.close()
def execfile(filepath):
global_namespace = {"__file__": filepath, "__name__": "__main__"}
exec(compile(open(filepath).read(), filepath, 'exec'), global_namespace)
def write_rst_contents(basepath):
'''
Write the rst file of the main page, needed for sphinx (index.html)
@@ -1532,14 +1540,18 @@ def write_rst_contents(basepath):
"mathutils", "mathutils.geometry", "mathutils.noise",
# misc
"bgl", "blf", "gpu", "aud", "bpy_extras",
# bmesh
"bmesh", "bmesh.types", "bmesh.utils",
# bmesh, submodules are in own page
"bmesh",
)
for mod in standalone_modules:
if mod not in EXCLUDE_MODULES:
fw(" %s\n\n" % mod)
# special case, this 'bmesh.ops.rst' is extracted from C source
if "bmesh.ops" not in EXCLUDE_MODULES:
execfile(os.path.join(SCRIPT_DIR, "rst_from_bmesh_opdefines.py"))
# game engine
if "bge" not in EXCLUDE_MODULES:
fw(title_string("Game Engine Modules", "=", double=True))
@@ -1701,6 +1713,8 @@ def copy_handwritten_rsts(basepath):
"bgl", # "Blender OpenGl wrapper"
"gpu", # "GPU Shader Module"
"bmesh.ops", # generated by rst_from_bmesh_opdefines.py
# includes...
"include__bmesh",
]
@@ -1712,6 +1726,11 @@ def copy_handwritten_rsts(basepath):
# changelog
shutil.copy2(os.path.join(RST_DIR, "change_log.rst"), basepath)
# copy images, could be smarter but just glob for now.
for f in os.listdir(RST_DIR):
if f.endswith(".png"):
shutil.copy2(os.path.join(RST_DIR, f), basepath)
def rna2sphinx(basepath):