This commit is contained in:
2026-05-17 11:09:44 -07:00
parent c5918926d8
commit 8b65973bff

View File

@ -93,7 +93,10 @@ def init_nodes(base_path=__path__, base_package=__package__, subpackages_only=Fa
if is_pkg: if is_pkg:
# The package must be loaded as well so that the modules from that package can be accessed (see the # The package must be loaded as well so that the modules from that package can be accessed (see the
# pkgutil.walk_packages documentation for more information on this) # pkgutil.walk_packages documentation for more information on this)
loader.find_module(module_name).load_module(module_name) if bpy.app.version >= (5, 1, 0):
importlib.import_module(module_name)
else:
loader.find_module(module_name).load_module(module_name)
# Only look at modules in sub packages if specified # Only look at modules in sub packages if specified
elif not subpackages_only or module_name.rsplit('.', 1)[0] != base_package: elif not subpackages_only or module_name.rsplit('.', 1)[0] != base_package: