[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27204] trunk/blender: parts of the Python API are unstable, big discalmer in API docs main page, API Docs title and interactive console banner.

Campbell Barton ideasman42 at gmail.com
Mon Mar 1 11:34:55 CET 2010


Revision: 27204
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27204
Author:   campbellbarton
Date:     2010-03-01 11:34:54 +0100 (Mon, 01 Mar 2010)

Log Message:
-----------
parts of the Python API are unstable, big discalmer in API docs main page, API Docs title and interactive console banner.

Modified Paths:
--------------
    trunk/blender/release/scripts/op/console_python.py
    trunk/blender/source/blender/python/doc/sphinx_doc_gen.py

Modified: trunk/blender/release/scripts/op/console_python.py
===================================================================
--- trunk/blender/release/scripts/op/console_python.py	2010-03-01 09:42:39 UTC (rev 27203)
+++ trunk/blender/release/scripts/op/console_python.py	2010-03-01 10:34:54 UTC (rev 27204)
@@ -192,6 +192,7 @@
     add_scrollback("Ctrl +/-  Wheel:  Zoom", 'OUTPUT')
     add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bgl, blf, Mathutils, Geometry", 'OUTPUT')
     add_scrollback("", 'OUTPUT')
+    add_scrollback("  WARNING!!! Blender 2.5 API is subject to change, see API reference for more info.", 'ERROR')
     add_scrollback("", 'OUTPUT')
     sc.prompt = PROMPT
 

Modified: trunk/blender/source/blender/python/doc/sphinx_doc_gen.py
===================================================================
--- trunk/blender/source/blender/python/doc/sphinx_doc_gen.py	2010-03-01 09:42:39 UTC (rev 27203)
+++ trunk/blender/source/blender/python/doc/sphinx_doc_gen.py	2010-03-01 10:34:54 UTC (rev 27204)
@@ -245,8 +245,8 @@
     filepath = os.path.join(BASEPATH, "conf.py")
     file = open(filepath, "w")
     fw = file.write
-    
-    
+
+
     version_string = bpy.app.version_string.split("(")[0]
     if bpy.app.build_revision != "Unknown":
         version_string = version_string + " r" + bpy.app.build_revision
@@ -254,8 +254,10 @@
     fw("project = 'Blender 3D'\n")
     # fw("master_doc = 'index'\n")
     fw("copyright = u'Blender Foundation'\n")
-    fw("version = '%s'\n" % version_string)
-    fw("release = '%s'\n" % version_string)
+    fw("version = '%s - UNSTABLE API'\n" % version_string)
+    fw("release = '%s - UNSTABLE API'\n" % version_string)
+    # not helpful since the source us generated, adds to upload size.
+    fw("html_copy_source = False\n")
     fw("\n")
     # needed for latex, pdf gen
     fw("latex_documents = [ ('contents', 'contents.tex', 'Blender Index', 'Blender Foundation', 'manual'), ]\n")
@@ -275,6 +277,21 @@
     fw("\n")
     fw("An introduction to blender and python can be found at <http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro>\n")
     fw("\n")
+    fw(".. warning:: The Python API in Blender is **UNSTABLE**, It should only be used for testing, any script written now may break in future releases.\n")
+    fw("   \n")
+    fw("   The following areas are subject to change.\n")
+    fw("      * operator names and arguments\n")
+    fw("      * function calls with the data api (any function calls with values accessed from bpy.data), including functions for importing and exporting meshes\n")
+    fw("      * class registration (Operator, Panels, Menus, Headers)\n")
+    fw("      * modules: bpy.props, blf)\n")
+    fw("      * members in the bpy.context have to be reviewed\n")
+    fw("      * python defined modal operators, especially drawing callbacks are highly experemental\n")
+    fw("   \n")
+    fw("   These parts of the API are relatively stable and are unlikely to change significantly\n")
+    fw("      * data API, access to attributes of blender data such as mesh verts, material color, timeline frames and scene objects\n")
+    fw("      * user interface functions for defining buttons, creation of menus, headers, panels\n")
+    fw("      * modules: bgl, Mathutils and Geometry\n")
+    fw("\n")
     fw(".. toctree::\n")
     fw("   :maxdepth: 1\n\n")
     fw("   bpy.ops.rst\n\n")
@@ -288,12 +305,10 @@
     fw("   bpy.props.rst\n\n")
     
     fw("   Mathutils.rst\n\n")
-    fw("   BLF.rst\n\n")
-
+    fw("   blf.rst\n\n")
     file.close()
 
 
-
     # internal modules
     filepath = os.path.join(BASEPATH, "bpy.ops.rst")
     file = open(filepath, "w")
@@ -332,7 +347,7 @@
     pymodule2sphinx(BASEPATH, "Mathutils", module, "Math Types & Utilities (Mathutils)")
     del module
 
-    import BLF as module
+    import blf as module
     pymodule2sphinx(BASEPATH, "blf", module, "Blender Font Drawing (blf)")
     del module
 





More information about the Bf-blender-cvs mailing list