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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/modules/bpy/utils.py')
-rw-r--r--release/scripts/modules/bpy/utils.py8
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