Docs: add code-comments to clarify bad-level include & developer only UI

This commit is contained in:
Campbell Barton
2025-02-12 10:55:45 +11:00
parent 24fe1f2d5c
commit e96acd433d
2 changed files with 7 additions and 0 deletions

View File

@@ -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__)

View File

@@ -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