Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-06-13 03:03:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-13 05:35:18 +0300
commitbe1e61b09352498e570c2852e7cc7ccb0d20394d (patch)
tree1111b40244d430c532bdd288e4d6c399cf31c2c0 /release/scripts/modules/bpy
parent2404220e80a99291a6bda2ffcd61b9400b98bf92 (diff)
Cleanup: tweak logic for skipping modules
Startup is the special case, so match against this instead of 'modules'.
Diffstat (limited to 'release/scripts/modules/bpy')
-rw-r--r--release/scripts/modules/bpy/utils/__init__.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py
index d3e0ecc729d..c96b0b88c6b 100644
--- a/release/scripts/modules/bpy/utils/__init__.py
+++ b/release/scripts/modules/bpy/utils/__init__.py
@@ -254,12 +254,10 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
if _os.path.isdir(path):
_sys_path_ensure(path)
- # only add this to sys.modules, don't run
- if path_subdir == "modules":
- continue
-
- for mod in modules_from_path(path, loaded_modules):
- test_register(mod)
+ # Only add to 'sys.modules' unless this is 'startup'.
+ if path_subdir == "startup":
+ for mod in modules_from_path(path, loaded_modules):
+ test_register(mod)
# load template (if set)
if any(_bpy.utils.app_template_paths()):