diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py index f8b66360e39..1f4866836a1 100644 --- a/release/scripts/modules/bpy/utils.py +++ b/release/scripts/modules/bpy/utils.py @@ -55,6 +55,13 @@ def _test_import(module_name, loaded_modules): def modules_from_path(path, loaded_modules): """ Load all modules in a path and return them as a list. + + :arg path: this path is scanned for scripts and packages. + :type path: string + :arg loaded_modules: alredy loaded module names, files matching these names will be ignored. + :type loaded_modules: set + :return: all loaded modules. + :rtype: list """ import traceback import time @@ -81,6 +88,14 @@ _bpy_types = __import__("bpy_types") # keep for comparisons, never ever reload t def load_scripts(reload_scripts=False, refresh_scripts=False): + """ + Load scripts and run each modules register function. + + :arg reload_scripts: Causes all scripts to have their unregister method called before loading. + :type reload_scripts: bool + :arg refresh_scripts: only load scripts which are not already loaded as modules. + :type refresh_scripts: bool + """ import traceback import time diff --git a/source/blender/python/doc/sphinx_doc_gen.py b/source/blender/python/doc/sphinx_doc_gen.py index e0cded8af85..e3258a15655 100644 --- a/source/blender/python/doc/sphinx_doc_gen.py +++ b/source/blender/python/doc/sphinx_doc_gen.py @@ -447,6 +447,9 @@ def rna2sphinx(BASEPATH): for struct in structs.values(): + # TODO, rna_info should filter these out! + if "_OT_" in struct.identifier: + continue write_struct(struct) # oeprators diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 49fac74bce8..43accf939aa 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -39,9 +39,16 @@ #include "../generic/Geometry.h" #include "../generic/BGL.h" #include "../generic/IDProp.h" - -/* todo, make nice syntax for sphinx */ -static char bpy_home_paths_doc[] = "home_paths(subfolder), return 3 paths to blender home directories (system, local, user), strings will be empty when not found."; + +static char bpy_home_paths_doc[] = +".. function:: home_paths(subfolder)\n" +"\n" +" return 3 paths to blender home directories.\n" +"\n" +" :arg subfolder: The name of a subfolder to find within the blenders home directory.\n" +" :type subfolder: string\n" +" :return: (system, local, user) strings will be empty when not found.\n" +" :rtype: tuple of strigs\n"; PyObject *bpy_home_paths(PyObject *self, PyObject *args) {