diff options
author | Doug Hammond <doughammond@hamsterfight.co.uk> | 2010-12-18 17:11:07 +0300 |
---|---|---|
committer | Doug Hammond <doughammond@hamsterfight.co.uk> | 2010-12-18 17:11:07 +0300 |
commit | 00924b79d57fe6c40714d6335a235287987514fb (patch) | |
tree | 38b1322e07bbfe95726ea958e4b50543c1e8155d /modules | |
parent | dcc7263cb77884a878df373c0b38679c38df0b62 (diff) |
extensions_framework: Updates for changes to user_resource API
Diffstat (limited to 'modules')
-rw-r--r-- | modules/extensions_framework/__init__.py | 2 | ||||
-rw-r--r-- | modules/extensions_framework/util.py | 10 |
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 |