extensions_framework: prefer user config and scripts dirs, if set, to save addon...
authorDoug Hammond <doughammond@hamsterfight.co.uk>
Sun, 5 Dec 2010 16:39:48 +0000 (16:39 +0000)
committerDoug Hammond <doughammond@hamsterfight.co.uk>
Sun, 5 Dec 2010 16:39:48 +0000 (16:39 +0000)
release/scripts/modules/extensions_framework/util.py

index 403eeb8a7592e547db2092ad626b67ef0d870af1..dc737c6e4ae69aa8d271eb2d8fb710be1c29dcc9 100644 (file)
@@ -33,7 +33,12 @@ import threading
 
 import bpy
 
-config_paths = bpy.utils.script_paths()
+"""List of possibly appropriate paths to load/save addon config from/to"""
+config_paths = []
+if bpy.utils.user_resource('CONFIG') != "": config_paths.append(bpy.utils.user_resource('CONFIG'))
+if bpy.utils.user_resource('SCRIPTS') != "": config_paths.append(bpy.utils.user_resource('SCRIPTS'))
+for pth in bpy.utils.script_paths():
+       if pth != "": config_paths.append(pth)
 
 """This path is set at the start of export, so that calls to
 path_relative_to_export() can make all exported paths relative to