diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-30 12:39:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-30 12:39:40 +0400 |
commit | a8b19260cf4dc0b9664a2cb749c5310165d874d6 (patch) | |
tree | 3b3fefb50b38d555ddf69da2f8796c9f56c3f44a /release/scripts/modules | |
parent | 7c5c256fd54050ad37ea535dd8be984b581a8e95 (diff) |
check for presets in addons dirs. this way addons can install their own presets too.
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bpy/utils.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py index cf3e92bdcbf..6fd15c146f2 100644 --- a/release/scripts/modules/bpy/utils.py +++ b/release/scripts/modules/bpy/utils.py @@ -349,6 +349,14 @@ def preset_paths(subdir): raise Exception("invalid subdir given %r" % subdir) elif _os.path.isdir(directory): dirs.append(directory) + + # Find addons preset paths + import addon_utils + for path in addon_utils.paths(): + directory = _os.path.join(path, "presets", subdir) + if _os.path.isdir(directory): + dirs.append(directory) + return dirs |