diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-02-13 04:13:16 +0300 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-02-13 04:13:16 +0300 |
commit | 135a944c66c57f11fd77b4f7231686353112e7ac (patch) | |
tree | 3928c457f44f544113e84b3356ab101e3820072e /release/scripts/modules/bpy/utils.py | |
parent | 1b3948f9aad25fec1923f5ccd36ea525d8e34fb6 (diff) | |
parent | 33b1cbf06d2c822c68676390b1775eb5d78de6e6 (diff) |
Merged changes in the trunk up to revision 26856.
Diffstat (limited to 'release/scripts/modules/bpy/utils.py')
-rw-r--r-- | release/scripts/modules/bpy/utils.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py index 7f10be362df..6d83450e059 100644 --- a/release/scripts/modules/bpy/utils.py +++ b/release/scripts/modules/bpy/utils.py @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # ##### END GPL LICENSE BLOCK ##### @@ -27,6 +27,7 @@ import bpy as _bpy import os as _os import sys as _sys +from _bpy import home_paths def load_scripts(reload_scripts=False, refresh_scripts=False): import traceback @@ -171,15 +172,12 @@ def script_paths(*args): # add user scripts dir user_script_path = _bpy.context.user_preferences.filepaths.python_scripts_directory - - if not user_script_path: - # XXX - WIN32 needs checking, perhaps better call a blender internal function. - user_script_path = _os.path.join(_os.path.expanduser("~"), ".blender", "scripts") - - user_script_path = _os.path.normpath(user_script_path) - - if user_script_path not in scripts and _os.path.isdir(user_script_path): - scripts.append(user_script_path) + + for path in home_paths("scripts") + (user_script_path, ): + if path: + path = _os.path.normpath(path) + if path not in scripts and _os.path.isdir(path): + scripts.append(path) if not args: return scripts @@ -190,7 +188,7 @@ def script_paths(*args): path_subdir = _os.path.join(path, subdir) if _os.path.isdir(path_subdir): script_paths.append(path_subdir) - + print(script_paths) return script_paths |