From e96acd433d5877d55da635d52e6a919d01f16629 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 12 Feb 2025 10:55:45 +1100 Subject: [PATCH] Docs: add code-comments to clarify bad-level include & developer only UI --- scripts/addons_core/bl_pkg/bl_extension_ui.py | 5 +++++ source/blender/blenkernel/CMakeLists.txt | 2 ++ 2 files changed, 7 insertions(+) diff --git a/scripts/addons_core/bl_pkg/bl_extension_ui.py b/scripts/addons_core/bl_pkg/bl_extension_ui.py index 8b57a508a62..612af148e8b 100644 --- a/scripts/addons_core/bl_pkg/bl_extension_ui.py +++ b/scripts/addons_core/bl_pkg/bl_extension_ui.py @@ -300,6 +300,11 @@ def addon_draw_item_expanded( row.label(text=mod.__file__, translate=False) # Add a button to quickly open the add-on's folder for accessing its files and assets. + # + # Only show this with a developer UI since extensions should be + # usable without direct file-system access / manipulation. + # If non-technical users need this for some task then we could consider alternative solutions, + # see: #128474 discussion for details. if show_developer_ui: import os row.operator("wm.path_open", text="", icon='FILE_FOLDER').filepath = os.path.dirname(mod.__file__) diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index d9c8428a3cc..3a8198fe47e 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -837,6 +837,8 @@ if(WITH_GTESTS) intern/volume_test.cc ) set(TEST_INC + # WARNING: this is a bad-level include which is only acceptable for tests + # and even then it would be good if the dependency could be removed. ../editors/include ) set(TEST_LIB