forked from LeenkxTeam/LNXSDK
Update
This commit is contained in:
@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user