include getset's for generating module docs.
used for bpy.debug/tempdir/driver_namespace which were previously undocumented.
This commit is contained in:
@@ -224,6 +224,16 @@ def pymodule2sphinx(BASEPATH, module_name, module, title):
|
|||||||
# write members of the module
|
# write members of the module
|
||||||
# only tested with PyStructs which are not exactly modules
|
# only tested with PyStructs which are not exactly modules
|
||||||
for key, descr in sorted(type(module).__dict__.items()):
|
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 type(descr) == types.MemberDescriptorType:
|
||||||
if descr.__doc__:
|
if descr.__doc__:
|
||||||
fw(".. data:: %s\n\n" % key)
|
fw(".. data:: %s\n\n" % key)
|
||||||
|
@@ -59,10 +59,10 @@ static PyStructSequence_Field app_info_fields[] = {
|
|||||||
{(char *)"build_revision", (char *)"The subversion revision this blender instance was built with"},
|
{(char *)"build_revision", (char *)"The subversion revision this blender instance was built with"},
|
||||||
{(char *)"build_platform", (char *)"The platform this blender instance was built for"},
|
{(char *)"build_platform", (char *)"The platform this blender instance was built for"},
|
||||||
{(char *)"build_type", (char *)"The type of build (Release, Debug)"},
|
{(char *)"build_type", (char *)"The type of build (Release, Debug)"},
|
||||||
{(char *)"build_cflags", (char *)""},
|
{(char *)"build_cflags", (char *)"C compiler flags"},
|
||||||
{(char *)"build_cxxflags", (char *)""},
|
{(char *)"build_cxxflags", (char *)"C++ compiler flags"},
|
||||||
{(char *)"build_linkflags", (char *)""},
|
{(char *)"build_linkflags", (char *)"Binary linking flags"},
|
||||||
{(char *)"build_system", (char *)""},
|
{(char *)"build_system", (char *)"Build system used"},
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user