sphinx api docs: fix for addons linking to the wrong operator SVN url's.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 5 May 2011 14:45:24 +0000 (14:45 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 5 May 2011 14:45:24 +0000 (14:45 +0000)
also change from blender from 'release' back to beta so new docs don't overwrite the 2.57b release docs.

doc/python_api/sphinx_doc_gen.py
source/blender/blenkernel/BKE_blender.h

index 258b28a3d33c7aa04dd5f430bcd7cd9e3973db7c..03c8fe1b4ff28dbaca891efa282bda1b01a933e9 100644 (file)
@@ -810,7 +810,9 @@ def pyrna2sphinx(BASEPATH):
 
     # operators
     def write_ops():
-        API_BASEURL = "https://svn.blender.org/svnroot/bf-blender/trunk/blender/release/scripts"
+        API_BASEURL = "http://svn.blender.org/svnroot/bf-blender/trunk/blender/release/scripts"
+        API_BASEURL_ADDON = "http://svn.blender.org/svnroot/bf-extensions/trunk/py/scripts"
+        API_BASEURL_ADDON_CONTRIB = "http://svn.blender.org/svnroot/bf-extensions/contrib/py/scripts"
 
         op_modules = {}
         for op in ops.values():
@@ -849,7 +851,14 @@ def pyrna2sphinx(BASEPATH):
 
                 location = op.get_location()
                 if location != (None, None):
-                    fw("   :file: `%s <%s/%s>`_:%d\n\n" % (location[0], API_BASEURL, location[0], location[1]))
+                    if location[0].startswith("addons_contrib" + os.sep):
+                        url_base = API_BASEURL_ADDON_CONTRIB
+                    elif location[0].startswith("addons" + os.sep):
+                        url_base = API_BASEURL_ADDON
+                    else:
+                        url_base = API_BASEURL
+
+                    fw("   :file: `%s <%s/%s>`_:%d\n\n" % (location[0], url_base, location[0], location[1]))
 
             file.close()
 
index 6c415010953a8096167f60bbc4341ecb3e054bc4..7e9f531162b6173eec6015f80fdfb290783074df 100644 (file)
@@ -53,7 +53,7 @@ extern "C" {
                /* can be left blank, otherwise a,b,c... etc with no quotes */
 #define BLENDER_VERSION_CHAR   b
                /* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE  release
+#define BLENDER_VERSION_CYCLE  beta
 
 struct ListBase;
 struct MemFile;