PyAPI: make internal modules explicitly "private"

Rename modules in `./scripts/modules/` to use an underscore prefix to
make it clear they aren't intended to be part of public API's. This
also means there is no implication that these modules should be stable,
allowing us to change them based on Blender's internal usage.

The following modules have been marked as private:

- `animsys_refactor`
- `bl_console_utils`
- `bl_i18n_utils`
- `bl_previews_utils`
- `bl_rna_utils`
- `bl_text_utils`
- `bl_ui_utils`
- `bpy_restrict_state`
- `console_python`
- `console_shell`
- `graphviz_export`
- `keyingsets_utils`
- `rna_info`
- `rna_manual_reference`
- `rna_xml`

Note that we could further re-arrange these modules
(under `_bpy_internal` in some cases), this change is mainly to mark
them as private, further changes can be handed on a case-by-case basis.

Ref !147773
This commit is contained in:
Campbell Barton
2025-10-13 09:35:09 +00:00
parent d7555b5064
commit 1216651ca9
63 changed files with 54 additions and 54 deletions

View File

@@ -31,7 +31,7 @@ from bpy.app.translations import (
def _rna_path_prop_search_for_context_impl(context, edit_text, unique_attrs):
# Use the same logic as auto-completing in the Python console to expand the data-path.
from bl_console_utils.autocomplete import intellisense
from _bl_console_utils.autocomplete import intellisense
context_prefix = "context."
line = context_prefix + edit_text
cursor = len(line)
@@ -148,7 +148,7 @@ def context_path_validate(context, data_path):
def context_path_to_rna_property(context, data_path):
from bl_rna_utils.data_path import property_definition_from_data_path
from _bl_rna_utils.data_path import property_definition_from_data_path
rna_prop = property_definition_from_data_path(context, "." + data_path)
if rna_prop is not None:
return rna_prop
@@ -167,7 +167,7 @@ def context_path_decompose(data_path):
# Note that the `.` is removed from the start of the first and second values,
# this is done because `.attr` isn't convenient to use as an argument,
# also the convention is not to include this within the data paths or the operator logic for `bpy.ops.wm.*`.
from bl_rna_utils.data_path import decompose_data_path
from _bl_rna_utils.data_path import decompose_data_path
path_split = decompose_data_path("." + data_path)
# Find the last property that isn't a function call.
@@ -1342,7 +1342,7 @@ class WM_OT_doc_view_manual(Operator):
self.report(
{'WARNING'},
rpt_("No reference available {!r}, "
"Update info in 'rna_manual_reference.py' "
"Update info in '_rna_manual_reference.py' "
"or callback to bpy.utils.manual_map()").format(self.doc_id)
)
return {'CANCELLED'}