[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26434] trunk/blender/release/scripts/ modules/bpy/utils.py: bugfix [#20638] not loading script in user script directory when startup

Campbell Barton ideasman42 at gmail.com
Sat Jan 30 15:48:46 CET 2010


Revision: 26434
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26434
Author:   campbellbarton
Date:     2010-01-30 15:48:46 +0100 (Sat, 30 Jan 2010)

Log Message:
-----------
bugfix [#20638] not loading script in user script directory when startup

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/bpy/utils.py

Modified: trunk/blender/release/scripts/modules/bpy/utils.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/utils.py	2010-01-30 14:41:51 UTC (rev 26433)
+++ trunk/blender/release/scripts/modules/bpy/utils.py	2010-01-30 14:48:46 UTC (rev 26434)
@@ -72,7 +72,7 @@
             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 @@
                     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:





More information about the Bf-blender-cvs mailing list