Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-14 08:11:50 +0300
committerCampbell Barton <campbell@blender.org>2022-09-14 08:17:51 +0300
commit260b75a952f40961d3e06c9a7f48ec9b696bf169 (patch)
tree17e7fb05a00a33010b5c6fcd3c7c5ba14478fc2e /doc/python_api/sphinx_doc_gen.py
parentd26220d97ab13f39b791468728a6089500d22caa (diff)
PyDoc: add an "Advanced" section to document WITH_PYTHON_MODULE
Document the use cases, usage and limitations of using Blender as a Python module.
Diffstat (limited to 'doc/python_api/sphinx_doc_gen.py')
-rw-r--r--doc/python_api/sphinx_doc_gen.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 240bec6fd30..e07afe44545 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -402,8 +402,15 @@ INFO_DOCS = (
"Tips and Tricks: Hints to help you while writing scripts for Blender"),
("info_gotcha.rst",
"Gotcha's: Some of the problems you may encounter when writing scripts"),
+ ("info_advanced.rst",
+ "Advanced use (topics which may not be required for typical usage)"),
("change_log.rst", "Change Log: List of changes since last Blender release"),
)
+# Referenced indirectly.
+INFO_DOCS_OTHER = (
+ # Included by: `info_advanced.rst`.
+ "info_advanced_blender_as_bpy.rst",
+)
# only support for properties atm.
RNA_BLACKLIST = {
@@ -1470,7 +1477,7 @@ def pyrna2sphinx(basepath):
struct_module_name = struct.module_name
if USE_ONLY_BUILTIN_RNA_TYPES:
- assert(struct_module_name == "bpy.types")
+ assert (struct_module_name == "bpy.types")
filepath = os.path.join(basepath, "%s.%s.rst" % (struct_module_name, struct.identifier))
file = open(filepath, "w", encoding="utf-8")
fw = file.write
@@ -2314,6 +2321,8 @@ def copy_handwritten_rsts(basepath):
if not EXCLUDE_INFO_DOCS:
for info, _info_desc in INFO_DOCS:
shutil.copy2(os.path.join(RST_DIR, info), basepath)
+ for info in INFO_DOCS_OTHER:
+ shutil.copy2(os.path.join(RST_DIR, info), basepath)
# TODO: put this docs in Blender's code and use import as per modules above.
handwritten_modules = [