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:
Diffstat (limited to 'doc/python_api/sphinx_doc_gen.py')
-rw-r--r--doc/python_api/sphinx_doc_gen.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 8be194a58a2..032f8a86bd5 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -545,6 +545,13 @@ def range_str(val):
def example_extract_docstring(filepath):
+ '''
+ Return (text, line_no, line_no_has_content) where:
+ - ``text`` is the doc-string text.
+ - ``line_no`` is the line the doc-string text ends.
+ - ``line_no_has_content`` when False, this file only contains a doc-string.
+ There is no need to include the remainder.
+ '''
file = open(filepath, "r", encoding="utf-8")
line = file.readline()
line_no = 0
@@ -553,7 +560,7 @@ def example_extract_docstring(filepath):
line_no += 1
else:
file.close()
- return "", 0, False
+ return "", 0, True
for line in file:
line_no += 1
@@ -1029,7 +1036,6 @@ def pymodule2sphinx(basepath, module_name, module, title, module_all_extra):
context_type_map = {
# context_member: (RNA type, is_collection)
"active_annotation_layer": ("GPencilLayer", False),
- "active_base": ("ObjectBase", False),
"active_bone": ("EditBone", False),
"active_gpencil_frame": ("GreasePencilLayer", True),
"active_gpencil_layer": ("GPencilLayer", True),
@@ -1549,8 +1555,8 @@ def pyrna2sphinx(basepath):
fw(".. hlist::\n")
fw(" :columns: 2\n\n")
- # context does its own thing
- # "active_base": ("ObjectBase", False),
+ # Context does its own thing.
+ # "active_object": ("Object", False),
for ref_attr, (ref_type, ref_is_seq) in sorted(context_type_map.items()):
if ref_type == struct_id:
fw(" * :mod:`bpy.context.%s`\n" % ref_attr)