Merge branch 'blender-v5.0-release'

This commit is contained in:
Campbell Barton
2025-10-13 20:37:56 +11:00
63 changed files with 54 additions and 54 deletions

View File

@@ -18,7 +18,7 @@ import glob
from pathlib import PurePath
# XXX Relative import does not work here when used from Blender...
from bl_i18n_utils import settings as settings_i18n, utils
from _bl_i18n_utils import settings as settings_i18n, utils
import bpy
@@ -31,7 +31,7 @@ filter_message = ignore_reg.match
def init_spell_check(settings, lang="en_US"):
try:
from bl_i18n_utils import utils_spell_check
from _bl_i18n_utils import utils_spell_check
return utils_spell_check.SpellChecker(settings, lang)
except Exception as ex:
print("Failed to import utils_spell_check ({})".format(str(ex)))
@@ -1231,7 +1231,7 @@ def dump_messages(do_messages, do_checks, settings):
# Get strings specific to translations' menu.
for lng in settings.LANGUAGES:
process_msg(
msgs, settings.DEFAULT_CONTEXT, lng[1], "Languages labels from bl_i18n_utils/settings.py",
msgs, settings.DEFAULT_CONTEXT, lng[1], "Languages labels from _bl_i18n_utils/settings.py",
reports, None, settings,
)

View File

@@ -22,7 +22,7 @@ import struct
import tempfile
import time
from bl_i18n_utils import (
from _bl_i18n_utils import (
settings,
utils_rtl,
)

View File

@@ -56,7 +56,7 @@ def gen_menu_file(stats, settings):
"# ID must be unique, except for 0 value (marks categories for menu).",
"# Line starting with a # are comments!",
"#",
"# Automatically generated by bl_i18n_utils/utils_languages_menu.py script.",
"# Automatically generated by _bl_i18n_utils/utils_languages_menu.py script.",
"# Highest ID currently in use: {}".format(highest_uid),
]
for uid_num, label, uid, flag, lvl in langs:

View File

@@ -237,7 +237,7 @@ execute.hooks = []
def autocomplete(context):
from bl_console_utils.autocomplete import intellisense
from _bl_console_utils.autocomplete import intellisense
sc = context.space_data

View File

@@ -332,7 +332,7 @@ def enable(module_name, *, default_set=False, persistent=False, refresh_handled=
import os
import sys
import importlib
from bpy_restrict_state import RestrictBlend
from _bpy_restrict_state import RestrictBlend
if handle_error is None:
def handle_error(ex):

View File

@@ -35,7 +35,7 @@ _modules = {}
def _enable(template_id, *, handle_error=None, ignore_not_found=False):
from bpy_restrict_state import RestrictBlend
from _bpy_restrict_state import RestrictBlend
if handle_error is None:
def handle_error(_ex):

View File

@@ -321,7 +321,7 @@ def load_scripts(*, reload_scripts=False, refresh_scripts=False, extensions=True
# Without this, add-on register functions accessing key-map properties can crash, see: #111702.
_bpy.context.window_manager.keyconfigs.update(keep_properties=True)
from bpy_restrict_state import RestrictBlend
from _bpy_restrict_state import RestrictBlend
with RestrictBlend():
for base_path in script_paths(use_user=use_user):
@@ -367,7 +367,7 @@ def _on_exit():
# Call `unregister` function on internal startup module.
# Must only be used as part of Blender 'exit' process.
from bpy_restrict_state import RestrictBlend
from _bpy_restrict_state import RestrictBlend
with RestrictBlend():
for mod_name in reversed(_registered_module_names):
if (mod := _sys.modules.get(mod_name)) is None:
@@ -1231,7 +1231,7 @@ def _blender_default_map():
# NOTE(@ideasman42): Avoid importing this as there is no need to keep the lookup table in memory.
# As this runs when the user accesses the "Online Manual", the overhead loading the file is acceptable.
# In my tests it's under 1/100th of a second loading from a `pyc`.
ref_mod = execfile(_os.path.join(_script_base_dir, "modules", "rna_manual_reference.py"))
ref_mod = execfile(_os.path.join(_script_base_dir, "modules", "_rna_manual_reference.py"))
return (ref_mod.url_manual_prefix, ref_mod.url_manual_mapping)