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:
authorBastien Montagne <bastien@blender.org>2022-07-06 15:46:02 +0300
committerBastien Montagne <bastien@blender.org>2022-07-06 15:46:02 +0300
commita2cadb786f3b0de39fda2626a3f32cfe3e41ed08 (patch)
treef5029e845961211ce9e396f92c0f60e4abe9ff87
parent3d4cfd228abf4ab8378ae83377e5c0b13867276b (diff)
API doc changelog generation: fix issue with version/path.
`BLENDER_VERSION_DOTS` has changed since 2.93, in that version of the codebase it cannot be used directly to get directory in the API doc matching Blender version.
-rw-r--r--doc/python_api/sphinx_doc_gen.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index db6b810762a..61f9dee24bd 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -503,9 +503,11 @@ def generate_changelog():
sphinx_changelog_gen = importlib.util.module_from_spec(spec)
spec.loader.exec_module(sphinx_changelog_gen)
+ _version_dot = "%d.%d" % (bpy.app.version[0], bpy.app.version[1])
+
API_DUMP_INDEX_FILEPATH = ARGS.api_dump_index_path
API_DUMP_ROOT = os.path.dirname(API_DUMP_INDEX_FILEPATH)
- API_DUMP_FILEPATH = os.path.abspath(os.path.join(API_DUMP_ROOT, BLENDER_VERSION_DOTS, "api_dump.json"))
+ API_DUMP_FILEPATH = os.path.abspath(os.path.join(API_DUMP_ROOT, _version_dot, "api_dump.json"))
API_CHANGELOG_FILEPATH = os.path.abspath(os.path.join(SPHINX_IN_TMP, "change_log.rst"))
sphinx_changelog_gen.main(("--", "--indexpath", API_DUMP_INDEX_FILEPATH, "dump", "--filepath-out", API_DUMP_FILEPATH))