Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hammond <doughammond@hamsterfight.co.uk>2010-12-18 17:11:07 +0300
committerDoug Hammond <doughammond@hamsterfight.co.uk>2010-12-18 17:11:07 +0300
commit00924b79d57fe6c40714d6335a235287987514fb (patch)
tree38b1322e07bbfe95726ea958e4b50543c1e8155d /modules
parentdcc7263cb77884a878df373c0b38679c38df0b62 (diff)
extensions_framework: Updates for changes to user_resource API
Diffstat (limited to 'modules')
-rw-r--r--modules/extensions_framework/__init__.py2
-rw-r--r--modules/extensions_framework/util.py10
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/extensions_framework/__init__.py b/modules/extensions_framework/__init__.py
index 6c4ced37..08bd57e7 100644
--- a/modules/extensions_framework/__init__.py
+++ b/modules/extensions_framework/__init__.py
@@ -29,11 +29,9 @@ import time
import bpy
from extensions_framework.ui import EF_OT_msg
-
bpy.types.register(EF_OT_msg)
del EF_OT_msg
-
def log(str, popup=False, module_name='EF'):
"""Print a message to the console, prefixed with the module_name
and the current time. If the popup flag is True, the message will
diff --git a/modules/extensions_framework/util.py b/modules/extensions_framework/util.py
index dc737c6e..b210e729 100644
--- a/modules/extensions_framework/util.py
+++ b/modules/extensions_framework/util.py
@@ -35,10 +35,12 @@ import bpy
"""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)
+if bpy.utils.user_resource('CONFIG', '') != "": config_paths.append(bpy.utils.user_resource('CONFIG', '', create=True))
+if bpy.utils.user_resource('SCRIPTS', '') != "": config_paths.append(bpy.utils.user_resource('SCRIPTS', '', create=True))
+# want to scan other script paths in reverse order, since the user path comes last
+sp = [p for p in bpy.utils.script_paths() if p != '']
+sp.reverse()
+config_paths.extend(sp)
"""This path is set at the start of export, so that calls to
path_relative_to_export() can make all exported paths relative to