Revision: 48393
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48393
Author:   campbellbarton
Date:     2012-06-29 08:33:13 +0000 (Fri, 29 Jun 2012)
Log Message:
-----------
fix for bug where user scripts path set by an environment variable would write 
presets there but not show up in the menu.

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  2012-06-29 06:47:43 UTC 
(rev 48392)
+++ trunk/blender/release/scripts/modules/bpy/utils.py  2012-06-29 08:33:13 UTC 
(rev 48393)
@@ -253,8 +253,8 @@
 
 
 def user_script_path():
-    prefs = _bpy.context.user_preferences
-    path = prefs.filepaths.script_directory
+    # returns the env var and falls back to userprefs
+    path = _user_resource('SCRIPTS')
 
     if path:
         path = _os.path.normpath(path)
@@ -281,7 +281,7 @@
     prefs = _bpy.context.user_preferences
 
     # add user scripts dir
-    user_script = prefs.filepaths.script_directory if user_pref else None
+    user_script = user_script_path()
 
     if check_all:
         # all possible paths

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to