check for presets in addons dirs. this way addons can install their own presets too.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user