Merged changes in the trunk up to revision 33765.
This commit is contained in:
@@ -65,11 +65,16 @@ EXAMPLE_SET_USED = set()
|
||||
_BPY_STRUCT_FAKE = "bpy_struct"
|
||||
_BPY_FULL_REBUILD = False
|
||||
|
||||
|
||||
def undocumented_message(module_name, type_name, identifier):
|
||||
if str(type_name).startswith('<module'):
|
||||
preloadtitle = '%s.%s' % (module_name, identifier)
|
||||
else:
|
||||
preloadtitle = '%s.%s.%s' % (module_name, type_name, identifier)
|
||||
message = "Undocumented (`contribute " \
|
||||
"<http://wiki.blender.org/index.php/Dev:2.5/Py/API/Documentation/Contribute" \
|
||||
"?action=edit§ion=new&preload=Dev:2.5/Py/API/Documentation/Contribute/Howto-message" \
|
||||
"&preloadtitle=%s.%s.%s>`_)\n\n" % (module_name, type_name, identifier)
|
||||
"&preloadtitle=%s>`_)\n\n" % preloadtitle
|
||||
return message
|
||||
|
||||
|
||||
@@ -225,6 +230,16 @@ def pymodule2sphinx(BASEPATH, module_name, module, title):
|
||||
# write members of the module
|
||||
# only tested with PyStructs which are not exactly modules
|
||||
for key, descr in sorted(type(module).__dict__.items()):
|
||||
if key.startswith("__"):
|
||||
continue
|
||||
# naughty, we also add getset's into PyStructs, this is not typical py but also not incorrect.
|
||||
if type(descr) == types.GetSetDescriptorType: # 'bpy_app_type' name is only used for examples and messages
|
||||
py_descr2sphinx("", fw, descr, module_name, "bpy_app_type", key)
|
||||
attribute_set.add(key)
|
||||
for key, descr in sorted(type(module).__dict__.items()):
|
||||
if key.startswith("__"):
|
||||
continue
|
||||
|
||||
if type(descr) == types.MemberDescriptorType:
|
||||
if descr.__doc__:
|
||||
fw(".. data:: %s\n\n" % key)
|
||||
@@ -403,6 +418,9 @@ def rna2sphinx(BASEPATH):
|
||||
|
||||
fw(" mathutils.rst\n\n")
|
||||
fw(" Freestyle.rst\n\n")
|
||||
fw(" mathutils.geometry.rst\n\n")
|
||||
# XXX TODO
|
||||
#fw(" bgl.rst\n\n")
|
||||
fw(" blf.rst\n\n")
|
||||
fw(" aud.rst\n\n")
|
||||
|
||||
@@ -484,6 +502,10 @@ def rna2sphinx(BASEPATH):
|
||||
pymodule2sphinx(BASEPATH, "mathutils", module, "Math Types & Utilities (mathutils)")
|
||||
del module
|
||||
|
||||
import mathutils.geometry as module
|
||||
pymodule2sphinx(BASEPATH, "mathutils.geometry", module, "Geometry Utilities (mathutils.geometry)")
|
||||
del module
|
||||
|
||||
import Freestyle as module
|
||||
pymodule2sphinx(BASEPATH, "Freestyle", module, "Freestyle Data Types & Operators (Freestyle)")
|
||||
del module
|
||||
@@ -492,6 +514,11 @@ def rna2sphinx(BASEPATH):
|
||||
pymodule2sphinx(BASEPATH, "blf", module, "Font Drawing (blf)")
|
||||
del module
|
||||
|
||||
# XXX TODO
|
||||
#import bgl as module
|
||||
#pymodule2sphinx(BASEPATH, "bgl", module, "Blender OpenGl wrapper (bgl)")
|
||||
#del module
|
||||
|
||||
import aud as module
|
||||
pymodule2sphinx(BASEPATH, "aud", module, "Audio System (aud)")
|
||||
del module
|
||||
|
||||
Reference in New Issue
Block a user