From fa5a8b3769aee2ce3621ae1c0ccb8b6afccf058b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Jun 2023 11:34:54 +0200 Subject: [PATCH] Fix documentation building since recent changes in GPv3 The #109197 introduced the following error to the documentation builders: Error: context key 'grease_pencil' not found in context_type_map; update ../doc/python_api/sphinx_doc_gen.py To reproduce the issue locally the following command could be used: ``` ./bin/Blender.app/Contents/MacOS/Blender \ --background \ --factory-startup \ -noaudio \ --python ../../blender/doc/python_api/sphinx_doc_gen.py -- \ --output ./sphinx/build_doc_api \ --api-changelog-generate \ --api-dump-index-path \ ./sphinx/api_dump_index.json ``` Note that even after this fix the command from above would still fail locally because the script expect information from previous Blender version to be in the index. It is possible to bypass by manually editing api_dump_index.json and adding 3.6 key. Pull Request: https://projects.blender.org/blender/blender/pulls/109365 --- doc/python_api/sphinx_doc_gen.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index b0526fe33f6..c4c4a5c2dc1 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -1185,6 +1185,7 @@ context_type_map = { "fluid": ("FluidSimulationModifier", False), "gpencil": ("GreasePencil", False), "gpencil_data": ("GreasePencil", False), + "grease_pencil": ("GreasePencilv3", False), "gpencil_data_owner": ("ID", False), "curves": ("Hair Curves", False), "id": ("ID", False),