[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33488] trunk/blender/release/scripts/ modules/extensions_framework/util.py: extensions_framework: prefer user config and scripts dirs, if set, to save addon config files to .
Doug Hammond
doughammond at hamsterfight.co.uk
Sun Dec 5 17:39:48 CET 2010
Revision: 33488
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33488
Author: dougal2
Date: 2010-12-05 17:39:48 +0100 (Sun, 05 Dec 2010)
Log Message:
-----------
extensions_framework: prefer user config and scripts dirs, if set, to save addon config files to.
Modified Paths:
--------------
trunk/blender/release/scripts/modules/extensions_framework/util.py
Modified: trunk/blender/release/scripts/modules/extensions_framework/util.py
===================================================================
--- trunk/blender/release/scripts/modules/extensions_framework/util.py 2010-12-05 16:14:34 UTC (rev 33487)
+++ trunk/blender/release/scripts/modules/extensions_framework/util.py 2010-12-05 16:39:48 UTC (rev 33488)
@@ -33,7 +33,12 @@
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
More information about the Bf-blender-cvs
mailing list