diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-05-26 13:43:03 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-05-26 13:43:03 +0300 |
commit | 8a6604f253e22bbade3dcf60b9a1c437ace44151 (patch) | |
tree | fee875d0a0b09fbe0df52aa83094159144048205 /doc/python_api/sphinx_doc_gen.py | |
parent | edf1b833674a6e54df7a16c14f0c6193fbbb482e (diff) | |
parent | afec66c024dc2b75447537d45406c06342ec201e (diff) |
Merge branch 'master' into temp-gpencil-maskingtemp-gpencil-masking
Conflicts:
source/blender/blenloader/intern/versioning_300.c
Diffstat (limited to 'doc/python_api/sphinx_doc_gen.py')
-rw-r--r-- | doc/python_api/sphinx_doc_gen.py | 14 |
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) |