bugfix [#20638] not loading script in user script directory when startup
authorCampbell Barton <ideasman42@gmail.com>
Sat, 30 Jan 2010 14:48:46 +0000 (14:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 30 Jan 2010 14:48:46 +0000 (14:48 +0000)
release/scripts/modules/bpy/utils.py

index 38de95aa6e49e227e4314b3b93a287f5a09cce35..dee1b36592f57296be72b71aaf43bd4b7a5b328e 100644 (file)
@@ -72,7 +72,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
             test_reload(_sys.modules[module_name])
 
     for base_path in script_paths():
-        for path_subdir in ("ui", "op", "io", "cfg"):
+        for path_subdir in ("", "ui", "op", "io", "cfg"):
             path = _os.path.join(base_path, path_subdir)
             if _os.path.isdir(path):
 
@@ -87,7 +87,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
                     if f.endswith(".py"):
                         # python module
                         mod = test_import(f[0:-3])
-                    elif "." not in f:
+                    elif ("." not in f) and (_os.path.isdir(_os.path.join(path, f, "__init__.py"))):
                         # python package
                         mod = test_import(f)
                     else: