[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26957] trunk/blender: update for missing docs & dont include operator classes in sphinx docs.
Campbell Barton
ideasman42 at gmail.com
Tue Feb 16 16:01:35 CET 2010
Revision: 26957
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26957
Author: campbellbarton
Date: 2010-02-16 16:01:34 +0100 (Tue, 16 Feb 2010)
Log Message:
-----------
update for missing docs & dont include operator classes in sphinx docs.
Modified Paths:
--------------
trunk/blender/release/scripts/modules/bpy/utils.py
trunk/blender/source/blender/python/doc/sphinx_doc_gen.py
trunk/blender/source/blender/python/intern/bpy.c
Modified: trunk/blender/release/scripts/modules/bpy/utils.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/utils.py 2010-02-16 13:57:23 UTC (rev 26956)
+++ trunk/blender/release/scripts/modules/bpy/utils.py 2010-02-16 15:01:34 UTC (rev 26957)
@@ -55,6 +55,13 @@
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 @@
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
Modified: trunk/blender/source/blender/python/doc/sphinx_doc_gen.py
===================================================================
--- trunk/blender/source/blender/python/doc/sphinx_doc_gen.py 2010-02-16 13:57:23 UTC (rev 26956)
+++ trunk/blender/source/blender/python/doc/sphinx_doc_gen.py 2010-02-16 15:01:34 UTC (rev 26957)
@@ -447,6 +447,9 @@
for struct in structs.values():
+ # TODO, rna_info should filter these out!
+ if "_OT_" in struct.identifier:
+ continue
write_struct(struct)
# oeprators
Modified: trunk/blender/source/blender/python/intern/bpy.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy.c 2010-02-16 13:57:23 UTC (rev 26956)
+++ trunk/blender/source/blender/python/intern/bpy.c 2010-02-16 15:01:34 UTC (rev 26957)
@@ -39,10 +39,17 @@
#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)
{
PyObject *ret= PyTuple_New(3);
More information about the Bf-blender-cvs
mailing list