From db22e6cb8bb6bf84c6a82cc0e6fd8cc0f882ba70 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Jun 2025 00:33:01 +0000 Subject: [PATCH] PyDocs: quiet context member warning without experimental features --- doc/python_api/sphinx_doc_gen.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 3052f539676..0cc74f1c2ef 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -1228,7 +1228,6 @@ context_type_map = { "particle_system": [("ParticleSystem", False)], "particle_system_editable": [("ParticleSystem", False)], "property": [("AnyType", False), ("str", False), ("int", False)], - "pointcloud": [("PointCloud", False)], "pose_bone": [("PoseBone", False)], "pose_object": [("Object", False)], "scene": [("Scene", False)], @@ -1276,6 +1275,13 @@ context_type_map = { "world": [("World", False)], } +if bpy.app.build_options.experimental_features: + for key, value in { + "pointcloud": [("PointCloud", False)], + }.items(): + assert key not in context_type_map, "Duplicate, the member must be removed from one of the dictionaries" + context_type_map[key] = value + def pycontext2sphinx(basepath): # Only use once. very irregular.