diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2016-10-23 12:14:48 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-10-23 12:15:52 +0300 |
commit | 672e906d49e6edee056bc1df7c413fb98f04f24a (patch) | |
tree | 50c2d87d490cf0d58d90add4ed30af719cda3efb /doc | |
parent | 8905c5c87495ad8fd876de83a968d79ac54f0e17 (diff) |
Add a built-in sphinx extension to allow cross-linking to the blender manual.
This works by downloading the objects.inv file (https://www.blender.org/manual/objects.inv)
and using it to resolve links with blender-manual: before them.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/python_api/rst/info_tutorial_addon.rst | 10 | ||||
-rw-r--r-- | doc/python_api/sphinx_doc_gen.py | 7 |
2 files changed, 9 insertions, 8 deletions
diff --git a/doc/python_api/rst/info_tutorial_addon.rst b/doc/python_api/rst/info_tutorial_addon.rst index 9326f80d4c3..60b4196d6d4 100644 --- a/doc/python_api/rst/info_tutorial_addon.rst +++ b/doc/python_api/rst/info_tutorial_addon.rst @@ -121,14 +121,8 @@ Add the following script to the text editor in Blender. obj.location.x += 1.0 -.. image:: run_script.png - :width: 924px - :align: center - :height: 574px - :alt: Run Script button - -Click the Run Script button, all objects in the active scene are moved by 1.0 Blender unit. -Next we will make this script into an add-on. +Click the :ref:`Run Script button <blender_manual:editors-text-run-script>`, +all objects in the active scene are moved by 1.0 Blender unit. Write the Add-on (Simple) diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 5034de7c02b..6c1b694333f 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -1632,6 +1632,13 @@ def write_sphinx_conf_py(basepath): file = open(filepath, "w", encoding="utf-8") fw = file.write + fw("import sys, os\n") + fw("\n") + fw("extensions = ['sphinx.ext.intersphinx']\n") + fw("\n") + fw("intersphinx_mapping = {'blender_manual': ('https://www.blender.org/manual/', None)}\n") + fw("\n") + fw("project = 'Blender'\n") # fw("master_doc = 'index'\n") fw("copyright = u'Blender Foundation'\n") |