== python api doc ==
authorLuca Bonavita <mindrones@gmail.com>
Wed, 13 Oct 2010 10:42:33 +0000 (10:42 +0000)
committerLuca Bonavita <mindrones@gmail.com>
Wed, 13 Oct 2010 10:42:33 +0000 (10:42 +0000)
First commit to make some structure in doc/ directory.

- moved source/blender/python/doc -> doc/python_api
- moved source/gameengine/PyDoc/*.rst -> doc/python_api/rst
- modified accordingly sphinx_doc_gen.py and sphinx_doc_gen.sh
  (later on I'll try alternative/ scripts by neXyon as promised :)
- source/gameengine/PyDoc/ is still there because contains epydoc stuff for the bge, will ask more and look into it later

28 files changed:
doc/python_api/blender-org/layout.html [new file with mode: 0644]
doc/python_api/blender-org/page.html [new file with mode: 0644]
doc/python_api/blender-org/static/bg.png [new file with mode: 0644]
doc/python_api/blender-org/static/default.css_t [new file with mode: 0644]
doc/python_api/blender-org/static/favicon.ico [new file with mode: 0644]
doc/python_api/blender-org/static/jquery.sidebar.js [new file with mode: 0644]
doc/python_api/blender-org/static/pygments.css [new file with mode: 0644]
doc/python_api/blender-org/static/rnd.png [new file with mode: 0644]
doc/python_api/blender-org/static/rndbl.png [new file with mode: 0644]
doc/python_api/blender-org/static/rndbr.png [new file with mode: 0644]
doc/python_api/blender-org/theme.conf [new file with mode: 0644]
doc/python_api/epy/BGL.py [moved from source/blender/python/doc/epy/BGL.py with 100% similarity]
doc/python_api/epy/Geometry.py [moved from source/blender/python/doc/epy/Geometry.py with 100% similarity]
doc/python_api/epy/IDProp.py [moved from source/blender/python/doc/epy/IDProp.py with 100% similarity]
doc/python_api/epy/Mathutils.py [moved from source/blender/python/doc/epy/Mathutils.py with 100% similarity]
doc/python_api/epy/testbgl.py [moved from source/blender/python/doc/epy/testbgl.py with 100% similarity]
doc/python_api/examples/bpy.data.py [moved from source/blender/python/doc/examples/bpy.data.py with 100% similarity]
doc/python_api/examples/mathutils.Euler.py [moved from source/blender/python/doc/examples/mathutils.Euler.py with 100% similarity]
doc/python_api/examples/mathutils.Matrix.py [moved from source/blender/python/doc/examples/mathutils.Matrix.py with 100% similarity]
doc/python_api/examples/mathutils.Quaternion.py [moved from source/blender/python/doc/examples/mathutils.Quaternion.py with 100% similarity]
doc/python_api/examples/mathutils.Vector.py [moved from source/blender/python/doc/examples/mathutils.Vector.py with 100% similarity]
doc/python_api/examples/mathutils.py [moved from source/blender/python/doc/examples/mathutils.py with 100% similarity]
doc/python_api/rst/bge.events.rst [moved from source/gameengine/PyDoc/bge.events.rst with 100% similarity]
doc/python_api/rst/bge.logic.rst [moved from source/gameengine/PyDoc/bge.logic.rst with 100% similarity]
doc/python_api/rst/bge.render.rst [moved from source/gameengine/PyDoc/bge.render.rst with 100% similarity]
doc/python_api/rst/bge.types.rst [moved from source/gameengine/PyDoc/bge.types.rst with 100% similarity]
doc/python_api/sphinx_doc_gen.py [moved from source/blender/python/doc/sphinx_doc_gen.py with 95% similarity]
doc/python_api/sphinx_doc_gen.sh [moved from source/blender/python/doc/sphinx_doc_gen.sh with 60% similarity]

diff --git a/doc/python_api/blender-org/layout.html b/doc/python_api/blender-org/layout.html
new file mode 100644 (file)
index 0000000..a37ed73
--- /dev/null
@@ -0,0 +1,201 @@
+{%- block doctype -%}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+{%- endblock %}
+{%- set script_files = script_files + [pathto("_static/jquery.sidebar.js", 1)] %}
+{%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
+{%- set reldelim2 = reldelim2 is not defined and ' •' or reldelim2 %}
+
+{%- macro relbar() %}
+    <div class="subnav boxheader">
+       <ul class="noprint"><li><a href="http://www.blender.org/development/coding-guides/">Coding Guides</a></li><li>•</li><li><a href="http://www.blender.org/development/report-a-bug/">Report a Bug</a></li><li>•</li><li><a href="http://www.blender.org/development/submit-a-patch/">Submit a Patch</a></li><li>•</li><li><a href="http://www.blender.org/development/release-logs/">Release Logs</a></li><li>•</li><li><a href="http://www.blender.org/development/current-projects/">Current Projects</a></li><li>•</li><li><a href="http://www.blender.org/development/architecture/">Architecture</a></li><li>•</li><li><a href="http://www.blender.org/development/building-blender/">Building Blender</a></li><li>•</li><li class="subnav-active"><a href="http://www.blender.org/documentation/250PythonDoc/contents.html">PyAPI</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Main_Page">Wiki</a></li></ul>
+    </div>
+    <div class="related subnav">
+      <h3>{{ _('Navigation') }}</h3>
+      <ul>
+        {%- for rellink in rellinks %}
+        <li class="right">
+          <a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
+             {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
+          {%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
+        {%- endfor %}
+        {%- block rootrellink %}
+        <li><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
+        {%- endblock %}
+        {%- for parent in parents %}
+          <li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
+        {%- endfor %}
+        {%- block relbaritems %} {% endblock %}
+      </ul>
+    </div>
+{%- endmacro %}
+
+{%- macro sidebar() %}
+      {%- if not embedded %}{% if not theme_nosidebar|tobool %}
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+          {%- block sidebarlogo %}
+          {%- if logo %}
+            <p class="logo"><a href="{{ pathto(master_doc) }}">
+              <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
+            </a></p>
+          {%- endif %}
+          {%- endblock %}
+          {%- block sidebartoc %}
+          {%- if display_toc %}
+            <h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
+            {{ toc }}
+          {%- endif %}
+          {%- endblock %}
+          {%- block sidebarrel %}
+          {%- if prev %}
+            <h4>{{ _('Previous topic') }}</h4>
+            <p class="topless"><a href="{{ prev.link|e }}"
+                                  title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
+          {%- endif %}
+          {%- if next %}
+            <h4>{{ _('Next topic') }}</h4>
+            <p class="topless"><a href="{{ next.link|e }}"
+                                  title="{{ _('next chapter') }}">{{ next.title }}</a></p>
+          {%- endif %}
+          {%- endblock %}
+          {%- block sidebarsourcelink %}
+          {%- if show_source and has_source and sourcename %}
+            <h3>{{ _('This Page') }}</h3>
+            <ul class="this-page-menu">
+              <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
+                     rel="nofollow">{{ _('Show Source') }}</a></li>
+            </ul>
+          {%- endif %}
+          {%- endblock %}
+          {%- if customsidebar %}
+          {% include customsidebar %}
+          {%- endif %}
+          {%- block sidebarsearch %}
+          {%- if pagename != "search" %}
+          <div id="searchbox" style="display: none">
+            <h3>{{ _('Quick search') }}</h3>
+              <form class="search" action="{{ pathto('search') }}" method="get">
+                <input type="text" name="q" size="18" />
+                <input type="submit" value="{{ _('Go') }}" />
+                <input type="hidden" name="check_keywords" value="yes" />
+                <input type="hidden" name="area" value="default" />
+              </form>
+              <p class="searchtip">
+              {{ _('Enter search terms or a module, class or function name.') }}
+              </p>
+          </div>
+          <script type="text/javascript">$('#searchbox').show(0);</script>
+          {%- endif %}
+          {%- endblock %}
+        </div>
+      </div>
+      {%- endif %}{% endif %}
+{%- endmacro %}
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    {{ metatags }}
+    {%- if not embedded and docstitle %}
+      {%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
+    {%- else %}
+      {%- set titlesuffix = "" %}
+    {%- endif %}
+    <title>{{ title|striptags }}{{ titlesuffix }}</title>
+    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
+    <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
+    {%- if not embedded %}
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '{{ pathto("", 1) }}',
+        VERSION:     '{{ release|e }}',
+        COLLAPSE_MODINDEX: false,
+        FILE_SUFFIX: '{{ file_suffix }}',
+        HAS_SOURCE:  {{ has_source|lower }}
+      };
+    </script>
+    {%- for scriptfile in script_files %}
+    <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
+    {%- endfor %}
+    {%- if use_opensearch %}
+    <link rel="search" type="application/opensearchdescription+xml"
+          title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
+          href="{{ pathto('_static/opensearch.xml', 1) }}"/>
+    {%- endif %}
+    {%- if favicon %}
+    <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
+    {%- endif %}
+    {%- endif %}
+{%- block linktags %}
+    {%- if hasdoc('about') %}
+    <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
+    {%- endif %}
+    {%- if hasdoc('genindex') %}
+    <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
+    {%- endif %}
+    {%- if hasdoc('search') %}
+    <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
+    {%- endif %}
+    {%- if hasdoc('copyright') %}
+    <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
+    {%- endif %}
+    <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
+    {%- if parents %}
+    <link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
+    {%- endif %}
+    {%- if next %}
+    <link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
+    {%- endif %}
+    {%- if prev %}
+    <link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
+    {%- endif %}
+{%- endblock %}
+{%- block extrahead %} {% endblock %}
+  </head>
+  <body>
+{%- block header %}
+<div class="noprint" id="navcontainer"><a href="http://www.blender.org/"><img width="140" height="50" title="blender.org home page" alt="blender.org home page" src="http://www.blender.org/fileadmin/site/_gfx/nav-home.png"></a><a href="http://www.blender.org/features-gallery/"><img width="140" height="50" title="Features &amp; Gallery" alt="Features &amp; Gallery" src="http://www.blender.org/fileadmin/site/_gfx/nav-features.png"></a><a href="http://www.blender.org/download/get-blender/"><img width="140" height="50" title="Download" alt="Download" src="http://www.blender.org/fileadmin/site/_gfx/nav-download.png"></a><a href="http://www.blender.org/education-help/"><img width="140" height="50" title="Tutorials &amp; Help" alt="Tutorials &amp; Help" src="http://www.blender.org/fileadmin/site/_gfx/nav-help.png"></a><a href="http://www.blender.org/community/user-community/"><img width="140" height="50" title="Community" alt="Community" src="http://www.blender.org/fileadmin/site/_gfx/nav-community.png"></a><a href="http://www.blender.org/development/"><img width="140" height="50" title="Development" alt="Development" src="http://www.blender.org/fileadmin/site/_gfx/nav-development-on.png"></a><a href="http://www.blender.org/e-shop/"><img width="140" height="50" title="e-Shop" alt="e-Shop" src="http://www.blender.org/fileadmin/site/_gfx/nav-eshop.png"></a></div>
+{% endblock %}
+
+    <div class="document">
+    <div id="pageheader"></div>
+{%- block relbar1 %}{{ relbar() }}{% endblock %}
+
+{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
+
+{%- block document %}
+      <div class="documentwrapper">
+      {%- if not embedded %}{% if not theme_nosidebar|tobool %}
+        <div class="bodywrapper">
+      {%- endif %}{% endif %}
+          <div class="body">
+            {% block body %} {% endblock %}
+          </div>
+      {%- if not embedded %}{% if not theme_nosidebar|tobool %}
+        </div>
+      {%- endif %}{% endif %}
+      </div>
+{%- endblock %}
+
+{%- block sidebar2 %}{{ sidebar() }}{% endblock %}
+      <div class="clearer"></div>
+
+{%- block footer %}
+    <div class="footer">
+    {%- if hasdoc('copyright') %}
+      {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
+    {%- else %}
+      {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
+    {%- endif %}
+    {%- if last_updated %}
+      {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
+    {%- endif %}
+    {%- if show_sphinx %}
+      {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
+    {%- endif %}
+    </div><b class="round"><b id="r1"></b><b id="r2"></b><b id="r3"></b><b id="r4"></b></b>
+{%- endblock %}
+    </div>
+  </body>
+</html>
diff --git a/doc/python_api/blender-org/page.html b/doc/python_api/blender-org/page.html
new file mode 100644 (file)
index 0000000..17a9301
--- /dev/null
@@ -0,0 +1,4 @@
+{% extends "layout.html" %}
+{% block body %}
+  {{ body }}
+{% endblock %}
diff --git a/doc/python_api/blender-org/static/bg.png b/doc/python_api/blender-org/static/bg.png
new file mode 100644 (file)
index 0000000..5393d4a
Binary files /dev/null and b/doc/python_api/blender-org/static/bg.png differ
diff --git a/doc/python_api/blender-org/static/default.css_t b/doc/python_api/blender-org/static/default.css_t
new file mode 100644 (file)
index 0000000..6f3f25d
--- /dev/null
@@ -0,0 +1,654 @@
+/**
+ * Sphinx stylesheet -- default theme
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+#navcontainer {
+    height: 50px;
+    margin: 0 auto;
+    position: relative;
+    width: 980px;
+}
+
+#navcontainer img {
+    width: 140px;
+    height: 50px;
+}
+
+#pageheader  {
+    background-image:url("bg.png");
+    height:80px;
+    position:relative;
+}
+
+body {
+    font-family: {{ theme_bodyfont }};
+    font-size: 12px;
+    line-height: 145%;
+    background-color: {{ theme_footerbgcolor }};
+    color: {{ theme_textcolor }};
+    min-width: 980px;
+    margin: 0;
+    padding: 0;
+}
+
+div.document {
+    margin:20px auto 0;
+    position:relative;
+    text-align:left;
+    width:980px;
+/*    background-color: {{ theme_sidebarbgcolor }};*/
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+    background-color: {{ theme_bgcolor }};
+    border-color: {{ theme_bordercolor }};
+    border-style:solid;
+    border-width:0 1px;
+    margin:0 auto;
+    min-height:30em;
+    padding:35px;
+/*    position:relative;*/
+    text-align:left;
+    width:908px;
+
+}
+
+div.bodywrapper {
+    margin: 0 0 0 230px;
+}
+
+div.body {
+    background-color: {{ theme_bgcolor }};
+    color: {{ theme_textcolor }};
+    padding: 0;
+    width: 640px;
+}
+
+{%- if theme_rightsidebar|tobool %}
+div.bodywrapper {
+    margin: 0 230px 0 0;
+}
+{%- endif %}
+
+div.footer {
+    background: #292929;
+    border-left: 1px solid #363636;
+    border-right: 1px solid #363636;
+    color: #ffffff;
+/*    width: 100%;*/
+    margin: 0 auto;
+    padding: 20px 20px 15px 35px;
+    text-align: center;
+    font-size: 75%;
+}
+
+div.footer+.round b {
+    display: block;
+    background: #292929;
+    width: auto;
+}
+
+div.footer+.round #r1 {
+    border-left: 1px solid #363636;
+    border-right: 1px solid #363636;
+    height: 2px;
+    margin: 0 1px;
+}
+
+div.footer+.round #r2 {
+    border-left: 1px solid #363636;
+    border-right: 1px solid #363636;
+    height: 1px;
+    margin: 0 2px;
+}
+
+div.footer+.round #r3 {
+    border-left: 1px solid #363636;
+    border-right: 1px solid #363636;
+    height: 1px;
+    margin: 0 3px;
+}
+
+div.footer+.round #r4 {
+    border-bottom: 1px solid #363636;
+    height: 0px;
+    margin: 0 5px;
+}
+
+div.footer a {
+    color: {{ theme_footertextcolor }};
+    text-decoration: underline;
+}
+
+.boxheader {
+    background-color:#3E4D5E;
+}
+
+.subnav {
+    height:auto !important;
+    min-height:15px;
+    padding:9px 0px 9px 37px;
+    position:relative;
+}
+
+div.related {
+    width:auto;
+    font-size:100%;
+    font-weight:400;
+    background-color: {{ theme_relbarbgcolor }};
+    line-height: 145%;
+    color: {{ theme_relbartextcolor }};
+}
+
+div.related li {
+    font-size:0.9em;
+}
+
+div.related li.right {
+    margin: 0;
+    word-spacing: 3px;
+}
+
+div.subnav li {
+    display:inline;
+    list-style-type:none;
+    margin:0;
+    padding:0 7px 0 0;
+}
+
+div.subnav ul {
+    display:inline;
+    margin:0;
+    padding:0;
+}
+
+.subnav a {
+    font-weight: bold;
+    color: #fff;
+}
+
+.subnav li.subnav-active a {
+       color:#F39410;
+}
+
+div.related a {
+    color: {{ theme_relbarlinkcolor }};
+}
+
+div.related a:active {
+    color: {{ theme_relbaractlinkcolor }};
+}
+
+div.sphinxsidebar {
+    width: 280px;
+    font-size: 100%;    
+    {%- if theme_stickysidebar|tobool %}
+/*    top: 30px;*/
+    margin: 0;
+    position: absolute;
+    overflow: auto;
+    height: 100%;
+    {%- endif %}
+    {%- if theme_rightsidebar|tobool %}
+    float: right;
+    {%- if theme_stickysidebar|tobool %}
+    right: 0;
+    {%- endif %}
+    {%- endif %}
+}
+
+div.sphinxsidebarwrapper {
+    width: inherit;    
+    padding: 0;
+    position: absolute;
+    margin-top: 35px;
+    font-size: 8pt;
+}
+
+div.sphinxsidebarwrapper.fixed {
+    position:fixed;
+    top:10px;
+    margin-top: 0;
+}
+
+{%- if theme_stickysidebar|tobool %}
+/* this is nice, but it it leads to hidden headings when jumping
+   to an anchor */
+/*
+div.related {
+    position: fixed;
+}
+
+div.documentwrapper {
+    margin-top: 30px;
+}
+*/
+{%- endif %}
+
+div.sphinxsidebar h3 {
+    font-family: {{ theme_headfont }};
+    color: {{ theme_sidebartextcolor }};
+    font-size: 12px;
+    font-weight: bold;
+    background: #3E4D5E url("rnd.png") no-repeat top left; 
+    height: 16px;
+    margin: 0;
+    padding: 10px 5px 10px 18px;
+}
+
+div.sphinxsidebar h3 a {
+    color: {{ theme_sidebartextcolor }};
+}
+
+div.sphinxsidebar h4 {
+    font-family: {{ theme_headfont }};
+    color: {{ theme_sidebartextcolor }};
+    background: #3E4D5E url("rnd.png") no-repeat top left; 
+    height: 16px;
+    font-size: 12px;
+    font-weight: bold;
+    margin: 0;
+    padding: 10px 5px 10px 18px;
+}
+
+div.sphinxsidebar form {
+    margin: 0;
+    padding: 10px;
+    background-color: #292929;
+    {%- if theme_rightsidebar|tobool %}
+    border-right: 1px solid {{ theme_bordercolor }};
+    {%- endif %}
+}
+
+div.sphinxsidebar p {
+    background-color: #292929;
+    padding: 5px 10px 10px 10px;
+    color: {{ theme_sidebartextcolor }};
+    {%- if theme_rightsidebar|tobool %}
+    border-right: 1px solid {{ theme_bordercolor }};
+    {%- endif %}
+    margin-top: 0;
+}
+
+div.sphinxsidebar p.topless {
+    margin-bottom: 25px;
+}
+
+div.sphinxsidebar ul {
+    background-color: #292929;
+    margin: 0;
+    padding: 0;
+    color: {{ theme_sidebartextcolor }};
+}
+
+div.sphinxsidebar > div > ul {
+    margin-bottom: 25px;
+    padding:10px;
+}
+
+div.sphinxsidebar a {
+    color: {{ theme_sidebarlinkcolor }};
+}
+
+div.sphinxsidebar input {
+    border: 1px solid {{ theme_sidebarlinkcolor }};
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+    color: {{ theme_linkcolor }};
+    text-decoration: none;
+}
+
+a:hover {
+    text-decoration: underline;
+}
+
+/*div.body h1,*/
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: {{ theme_headfont }};
+    background-color: {{ theme_headbgcolor }};
+    font-weight: bold;
+    color: {{ theme_headtextcolor }};
+/*    border-bottom: 1px solid #ccc;*/
+    margin: 20px -20px 10px -20px;
+    padding: 3px 0 3px 10px;
+}
+
+div.body h1 { margin-top: 0; font-size: 200%; 
+    color:#FFFAE0;
+    font-family:"Helvetica","Arial",sans-serif;
+    font-size:34px;
+    font-weight:normal;
+    left:32px;
+    line-height:26px;
+    margin-top:0;
+    position:absolute;
+    top:36px;
+}
+div.body h2 { font-size: 160%; }
+div.body h3 { font-size: 140%; }
+div.body h4 { font-size: 120%; }
+div.body h5 { font-size: 110%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+    color: {{ theme_headlinkcolor }};
+    font-size: 0.8em;
+    padding: 0 4px 0 4px;
+    text-decoration: none;
+}
+
+h1:hover > a.headerlink {
+    display:none;
+}
+
+a.headerlink:hover {
+    background-color: {{ theme_headlinkcolor }};
+    color: white;
+}
+
+div.body p, div.body dd, div.body li {
+    text-align: justify;
+    line-height: 130%;
+}
+
+div.note, div.seealso, div.topic, div.warning {
+    color:white;
+}
+
+div.admonition p.admonition-title + p {
+    display: inline;
+}
+
+div.note {
+    background-color: #555;
+    border: 1px solid #ddd;
+}
+
+div.seealso {
+    background-color: #525241;
+    border: 1px solid #ff6;
+}
+
+div.topic {
+    background-color: #eee;
+}
+
+div.warning {
+    background-color: #B64444;
+    border: 1px solid #990606;
+}
+
+p.admonition-title {
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+dl div.admonition {
+    border:medium none;
+    margin:0;
+    padding:2px 5px 2px 0;
+}
+
+dl.class > dd > div.warning p.admonition-title,
+dl.class > dd > div.note p.admonition-title {
+    display:none;
+}
+
+dl.class > dd > div.admonition.warning p,
+dl.class > dd > div.admonition.note p {
+    margin:0;
+}
+
+dl.class > dd > div.admonition.warning,
+dl.class > dd > div.admonition.note {
+    margin-bottom:12px;
+}
+
+dl div.admonition.note p.admonition-title, dl div.admonition.warning p.admonition-title {
+    color:inherit;
+}
+
+dl div.admonition.warning p {
+    font-weight:bold;
+    line-height:150%;
+}
+
+dl div.admonition.warning p * {
+    font-weight:normal;
+}
+
+dl div.admonition p.admonition-title {
+    color:#555555;
+    display:block;
+    float:left;
+    margin:0;
+    padding-right:12px;
+    text-align:right;
+    width:90px;
+}
+
+dl div.admonition p.admonition-title+p, dl div.admonition p {
+    display:block;
+    margin:0 0 0 102px;
+}
+
+dl div.note {
+    background:none;
+    color:#E8E481;
+}
+
+dl div.warning {
+    background:none;
+    color:#FC3030;
+}
+
+dl div.seealso {
+    background:none;
+}
+
+dl div.admonition.seealso p+p {
+    color:#222;
+}
+
+dl div.seealso a {
+    margin-left:-1.3ex;
+}
+
+div.admonition.warning pre {
+    background: #0F0704;
+    color: #fc3030;
+}
+
+div.admonition pre {
+    margin: 6px 0;
+    overflow: visible;
+    white-space: pre-wrap;
+}
+
+pre {
+    padding: 10px;
+    background-color: #000;
+    color: #fff;
+    line-height: normal;
+    border: 0 solid white;
+}
+
+dl.function>dt, dl.method>dt {
+    text-indent:-118px;
+    padding-left: 118px;
+}
+
+dl.function>dt em, dl.method>dt em {
+    color: #97b9cf;
+}
+
+dl.function>dd em, dl.method>dd em {
+    color: #97b9cf;
+    font-weight:bold;
+}
+
+dl.function table.field-list tr:first-child td.field-body, dl.method table.field-list tr:first-child td.field-body {
+    color: #728c96;
+}
+
+dl.function>dt em:before, dl.method>dt em:before {
+    content: " ";
+    display: block;
+}
+
+dl.function>dd>p,dl.method>dd>p,dl.attribute>dd>p,
+dl[class]>dd>ol,dl[class]>dd>ul {
+    color: #999;
+}
+
+dl.data>dt {
+    color:#08C659;
+}
+
+dl.data>dd>p {
+    color:#069643;
+}
+
+dl.class>dt {
+    color: #82a3c7;
+}
+
+dl.class>dd>p,dl.class>dd>ol,dl.class>dd>ul {
+    color: #637b96;
+}
+
+dl.function>dt,dl.method>dt,dl.attribute>dt {
+    color: #fcb100;
+}
+
+dl.function>dd>p,dl.method>dd>p,dl.attribute>dd>p,
+dl.function>dd>p+ol,dl.method>dd>p+ol,dl.attribute>dd>p+ol,
+dl.function>dd>p+ul,dl.method>dd>p+ul,dl.attribute>dd>p+ul {
+    color: #cb8f00;
+}
+
+dl.function>dd>p, dl.method>dd>p, dl.attribute>dd>p {
+    margin: 0 0 3px 102px;
+}
+
+dl.function>dd>p:first-child:before, dl.method>dd>p:first-child:before, dl.attribute>dd>p:first-child:before {
+    content:"Description:";
+    color:#555;
+    font-weight:bold;
+    font-style:normal;
+    width:90px;
+    display:inline-block;
+    margin-left:-102px;
+    text-align:right;
+    padding-right:12px;
+}
+
+dt:target, .highlight {
+    color: #444;
+    background: #333;
+}
+
+.highlight {
+    background: #E2C788;
+}
+
+h1 .highlight {
+    color:inherit;
+    background:inherit;
+}
+
+dl {
+    margin-bottom: 25px;
+}
+
+dd {
+    margin: 3px 0 10px 15px;
+}
+
+.field-body tt.literal {
+    font-weight: normal;
+} 
+
+tt {
+    background-color: #444;
+    padding: 0 1px 0 1px;
+    font-size: 0.95em;
+}
+
+.warning tt {
+    background: #cc6262;
+}
+
+.note tt {
+    background: #444;
+}
+
+dl .warning tt {
+    background:#0F0704;
+    display:block;
+}
+
+dl .note tt {
+    background:#2C2A1B;
+}
+
+table.indextable tr.cap {
+    background-color: transparent;
+}
+
+col.field-name  {
+    width:90px;
+}
+
+dd table {
+    margin-bottom: 0;
+}
+
+table.field-list th {
+    color:#555;
+    padding:0;
+    text-align:right;
+}
+
+table.field-list td.field-body {
+    color:#999999;
+    padding-left:12px;
+}
+
+table.field-list td.field-body ul.first {
+    padding-left:0;
+    list-style:none;
+    margin-left:0;
+}
+
+dl.function>dd>ol, dl.method>dd>ol, dl.attribute>dd>ol,
+dl.function>dd>ul, dl.method>dd>ul, dl.attribute>dd>ul,
+dl.function>dd>div[class|="highlight"], dl.method>dd>div[class|="highlight"],
+dl.attribute>dd>div[class|="highlight"] {
+    margin-left:102px;
+}
+
+dl.function>dd>ol, dl.method>dd>ol, dl.attribute>dd>ol,
+dl.function>dd>ul, dl.method>dd>ul, dl.attribute>dd>ul,
+dl.class>dd>ol, dl.class>dd>ul {
+    padding-left:20px;
+}
diff --git a/doc/python_api/blender-org/static/favicon.ico b/doc/python_api/blender-org/static/favicon.ico
new file mode 100644 (file)
index 0000000..f125d24
Binary files /dev/null and b/doc/python_api/blender-org/static/favicon.ico differ
diff --git a/doc/python_api/blender-org/static/jquery.sidebar.js b/doc/python_api/blender-org/static/jquery.sidebar.js
new file mode 100644 (file)
index 0000000..c22c61f
--- /dev/null
@@ -0,0 +1,26 @@
+$(document).ready(function () {
+    var top = $('.sphinxsidebarwrapper').offset().top - parseFloat($('.sphinxsidebarwrapper').css ('marginTop').replace(/auto/, 0));
+    var colheight = parseFloat($('.sphinxsidebarwrapper').css('height').replace(/auto/, 0));
+
+
+$(window).scroll(function (event) {
+    // what the y position of the scroll is
+    var y = $(this).scrollTop();
+
+    // whether that's below the form
+    if (y >= top) {
+        //colheight is checked and according to its vaule the scrolling
+        //is triggered or not
+        if (colheight <= window.innerHeight) {
+            // if so, ad the fixed class
+            $('.sphinxsidebarwrapper').addClass('fixed');
+        } else {
+            // otherwise remove it
+            $('.sphinxsidebarwrapper').removeClass('fixed');
+        }
+    } else {
+        // otherwise remove it
+        $('.sphinxsidebarwrapper').removeClass('fixed');
+    }
+});
+}); 
diff --git a/doc/python_api/blender-org/static/pygments.css b/doc/python_api/blender-org/static/pygments.css
new file mode 100644 (file)
index 0000000..d67231e
--- /dev/null
@@ -0,0 +1,61 @@
+.hll { background-color: #ffffcc }
+.c { color: #7f7f7f; font-style: italic } /* Comment */
+.err { border: 1px solid #FF0000 } /* Error */
+.k { color: #0088ff; font-weight: bold } /* Keyword */
+.o { color: #993399 } /* Operator */
+.cm { color: #7f7f7f; font-style: italic } /* Comment.Multiline */
+.cp { color: #007020 } /* Comment.Preproc */
+.c1 { color: #408090; font-style: italic } /* Comment.Single */
+.cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
+.gd { color: #A00000 } /* Generic.Deleted */
+.ge { font-style: italic } /* Generic.Emph */
+.gr { color: #FF0000 } /* Generic.Error */
+.gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.gi { color: #00A000 } /* Generic.Inserted */
+.go { color: #303030 } /* Generic.Output */
+.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.gs { font-weight: bold } /* Generic.Strong */
+.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.gt { color: #0040D0 } /* Generic.Traceback */
+.kc { color: #007020; font-weight: bold } /* Keyword.Constant */
+.kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
+.kn { color: #FFFF32; font-weight: bold } /* Keyword.Namespace */
+.kp { color: #007020 } /* Keyword.Pseudo */
+.kr { color: #FFFF32; font-weight: bold } /* Keyword.Reserved */
+.kt { color: #902000 } /* Keyword.Type */
+.m { color: #00BAFF } /* Literal.Number */
+.s { color: #B7C274 } /* Literal.String */
+.na { color: #4070a0 } /* Name.Attribute */
+.nb { color: #007020 } /* Name.Builtin */
+.nc { color: #0e84b5; font-weight: bold } /* Name.Class */
+.no { color: #60add5 } /* Name.Constant */
+.nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.ni { color: #d55537; font-weight: bold } /* Name.Entity */
+.ne { color: #007020 } /* Name.Exception */
+.nf { color: #06287e } /* Name.Function */
+.nl { color: #002070; font-weight: bold } /* Name.Label */
+.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.nt { color: #062873; font-weight: bold } /* Name.Tag */
+.nv { color: #bb60d5 } /* Name.Variable */
+.ow { color: #007020; font-weight: bold } /* Operator.Word */
+.w { color: #bbbbbb } /* Text.Whitespace */
+.mf { color: #00BAFF } /* Literal.Number.Float */
+.mh { color: #00BAFF } /* Literal.Number.Hex */
+.mi { color: #00BAFF } /* Literal.Number.Integer */
+.mo { color: #00BAFF } /* Literal.Number.Oct */
+.sb { color: #B7C274 } /* Literal.String.Backtick */
+.sc { color: #B7C274 } /* Literal.String.Char */
+.sd { color: #B7C274; font-style: italic } /* Literal.String.Doc */
+.s2 { color: #B7C274 } /* Literal.String.Double */
+.se { color: #B7C274; font-weight: bold } /* Literal.String.Escape */
+.sh { color: #B7C274 } /* Literal.String.Heredoc */
+.si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
+.sx { color: #c65d09 } /* Literal.String.Other */
+.sr { color: #235388 } /* Literal.String.Regex */
+.s1 { color: #4070a0 } /* Literal.String.Single */
+.ss { color: #517918 } /* Literal.String.Symbol */
+.bp { color: #007020 } /* Name.Builtin.Pseudo */
+.vc { color: #bb60d5 } /* Name.Variable.Class */
+.vg { color: #bb60d5 } /* Name.Variable.Global */
+.vi { color: #bb60d5 } /* Name.Variable.Instance */
+.il { color: #00BAFF } /* Literal.Number.Integer.Long */
diff --git a/doc/python_api/blender-org/static/rnd.png b/doc/python_api/blender-org/static/rnd.png
new file mode 100644 (file)
index 0000000..95bc613
Binary files /dev/null and b/doc/python_api/blender-org/static/rnd.png differ
diff --git a/doc/python_api/blender-org/static/rndbl.png b/doc/python_api/blender-org/static/rndbl.png
new file mode 100644 (file)
index 0000000..9761616
Binary files /dev/null and b/doc/python_api/blender-org/static/rndbl.png differ
diff --git a/doc/python_api/blender-org/static/rndbr.png b/doc/python_api/blender-org/static/rndbr.png
new file mode 100644 (file)
index 0000000..de94512
Binary files /dev/null and b/doc/python_api/blender-org/static/rndbr.png differ
diff --git a/doc/python_api/blender-org/theme.conf b/doc/python_api/blender-org/theme.conf
new file mode 100644 (file)
index 0000000..a4356fd
--- /dev/null
@@ -0,0 +1,30 @@
+[theme]
+inherit = basic
+stylesheet = default.css
+pygments_style = sphinx
+
+[options]
+rightsidebar  = true
+stickysidebar = true
+
+footerbgcolor      = #000000
+footertextcolor    = #ffffff
+sidebarbgcolor     = #1c4e63
+sidebartextcolor   = #ffffff
+sidebarlinkcolor   = #97b9cf
+relbarbgcolor      = #2C3845
+relbartextcolor    = #D3E0E9
+relbarlinkcolor    = #D3E0E9
+relbaractlinkcolor = #f39410
+bgcolor            = #232323
+bordercolor        = #363636
+textcolor          = #ffffff
+headbgcolor        = #232323
+headtextcolor      = #ffffff
+headlinkcolor      = #97b9cf
+linkcolor          = #97b9cf
+codebgcolor        = #eeffcc
+codetextcolor      = #333333
+
+bodyfont = "Lucida Grande","Lucida Sans Unicode","Lucida Sans","Lucida",Verdana,sans-serif
+headfont = "Lucida Grande","Lucida Sans Unicode","Lucida Sans","Lucida",Verdana,sans-serif
similarity index 95%
rename from source/blender/python/doc/sphinx_doc_gen.py
rename to doc/python_api/sphinx_doc_gen.py
index b20cd74f82a29700e5067dd44ac55a15d96f9377..7a78816a2db5b0e05e1b03e71b5ec8d535e3a98a 100644 (file)
  # #**** END GPL LICENSE BLOCK #****
 
 script_help_msg = '''
-Usage,
-run this script from blenders root path once you have compiled blender
-    ./blender.bin -b -P /b/source/blender/python/doc/sphinx_doc_gen.py
+Usage:
 
-This will generate python files in "./source/blender/python/doc/sphinx-in"
-Generate html docs by running...
-    
-    sphinx-build source/blender/python/doc/sphinx-in source/blender/python/doc/sphinx-out
+For HTML generation
+-------------------
+- Run this script from blenders root path once you have compiled blender
+
+    ./blender.bin -b -P doc/python_api/sphinx_doc_gen.py
 
+  This will generate python files in doc/python_api/sphinx-in/,
+  assuming that ./blender.bin is or links to the blender executable
 
+- Generate html docs by running...
+    
+    sphinx-build doc/python_api/sphinx-in doc/python_api/sphinx-out
+
+  assuming that you have sphinx 0.6.7 installed
+  
 For PDF generation
+------------------
+- After you have built doc/python_api/sphinx-in (see above), run:
 
-    sphinx-build -b latex source/blender/python/doc/sphinx-in source/blender/python/doc/sphinx-out
-    cd source/blender/python/doc/sphinx-out
+    sphinx-build -b latex doc/python_api/sphinx-in doc/python_api/sphinx-out
+    cd doc/python_api/sphinx-out
     make
 '''
 
@@ -475,13 +484,13 @@ def rna2sphinx(BASEPATH):
     pymodule2sphinx(BASEPATH, "aud", module, "Audio System (aud)")
     del module
 
-    # game engine
+    ## game engine
     import shutil
     # copy2 keeps time/date stamps
-    shutil.copy2(os.path.join(BASEPATH, "../../../../gameengine/PyDoc/bge.types.rst"), BASEPATH)
-    shutil.copy2(os.path.join(BASEPATH, "../../../../gameengine/PyDoc/bge.logic.rst"), BASEPATH)
-    shutil.copy2(os.path.join(BASEPATH, "../../../../gameengine/PyDoc/bge.render.rst"), BASEPATH)
-    shutil.copy2(os.path.join(BASEPATH, "../../../../gameengine/PyDoc/bge.events.rst"), BASEPATH)
+    shutil.copy2(os.path.join(BASEPATH,"..","rst","bge.types.rst"), BASEPATH)
+    shutil.copy2(os.path.join(BASEPATH,"..","rst","bge.logic.rst"), BASEPATH)
+    shutil.copy2(os.path.join(BASEPATH,"..","rst","bge.render.rst"), BASEPATH)
+    shutil.copy2(os.path.join(BASEPATH,"..","rst","bge.events.rst"), BASEPATH)
 
 
     if 0:
@@ -794,9 +803,10 @@ def main():
     else:
         import shutil
 
-        path_in = 'source/blender/python/doc/sphinx-in'
-        path_out = 'source/blender/python/doc/sphinx-out'
-        path_examples = 'source/blender/python/doc/examples'
+        script_dir = os.path.dirname(__file__)
+        path_in = os.path.join(script_dir,'sphinx-in')
+        path_out = os.path.join(script_dir,'sphinx-out')
+        path_examples = os.path.join(script_dir,'examples')
         # only for partial updates
         path_in_tmp = path_in + "-tmp"
 
similarity index 60%
rename from source/blender/python/doc/sphinx_doc_gen.sh
rename to doc/python_api/sphinx_doc_gen.sh
index 607803d16d508363210bed7f4e5eb7c5f073eb49..49a2e4869d8438825f20bea4105552bbdb8aa5bc 100755 (executable)
@@ -10,7 +10,7 @@ SSH_UPLOAD="/data/www/vhosts/www.blender.org/documentation" # blender_python_api
 # sed string from hell, 'Blender 2.53 (sub 1) Build' --> '2_53_1'
 # "_".join(str(v) for v in bpy.app.version)
 # custom blender vars
-blender_srcdir=$(dirname $0)/../../../../
+blender_srcdir=$(dirname $0)/../../
 blender_version=$(grep BLENDER_VERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
 blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | tr -dc 0-9)
 BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)_$blender_subversion
@@ -18,18 +18,20 @@ BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)_$b
 BLENDER_VERSION=`$BLENDER --version | cut -f2-4 -d" " | sed 's/(//g' | sed 's/)//g' | sed 's/ sub /./g' | sed 's/\./_/g'`
 SSH_UPLOAD_FULL=$SSH_UPLOAD/"blender_python_api_"$BLENDER_VERSION
 
+SPHINXBASE=doc/python_api/
+
 # dont delete existing docs, now partial updates are used for quick builds.
-$BLENDER --background --python ./source/blender/python/doc/sphinx_doc_gen.py
+$BLENDER --background --python $SPHINXBASE/sphinx_doc_gen.py
 
 # html
-sphinx-build source/blender/python/doc/sphinx-in source/blender/python/doc/sphinx-out
-cp source/blender/python/doc/sphinx-out/contents.html source/blender/python/doc/sphinx-out/index.html
+sphinx-build $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
+cp $SPHINXBASE/sphinx-out/contents.html $SPHINXBASE/sphinx-out/index.html
 ssh ideasman42@emo.blender.org 'rm -rf '$SSH_UPLOAD_FULL'/*'
-rsync --progress -avze "ssh -p 22" /b/source/blender/python/doc/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
+rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
 
 # pdf
-sphinx-build -b latex source/blender/python/doc/sphinx-in source/blender/python/doc/sphinx-out
-cd source/blender/python/doc/sphinx-out
+sphinx-build -b latex $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
+cd $SPHINXBASE/sphinx-out
 make
-cd ../../../../../
-rsync --progress -avze "ssh -p 22" source/blender/python/doc/sphinx-out/contents.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
+cd -
+rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/contents.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf