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:
authorCampbell Barton <ideasman42@gmail.com>2012-01-18 11:04:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-18 11:04:17 +0400
commitb281b5278f8f40330e0eec263b333f73c99fc08e (patch)
treee10de9bb09540b7639bccd4a5441ee28e24e6b97 /release/scripts/modules
parent0f28c1c27aec41dd22e31aac2c02cdfae785dd1b (diff)
parent7f08c71f43f487cf278684d9170652c8193e7f48 (diff)
svn merge ^/trunk/blender -r43472:43482
Diffstat (limited to 'release/scripts/modules')
-rw-r--r--release/scripts/modules/addon_utils.py8
-rw-r--r--release/scripts/modules/bpy/utils.py17
2 files changed, 11 insertions, 14 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index b64b32b3126..2b1616a0022 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -38,17 +38,17 @@ addons_fake_modules = {}
def paths():
# RELEASE SCRIPTS: official scripts distributed in Blender releases
- paths = _bpy.utils.script_paths("addons")
+ addon_paths = _bpy.utils.script_paths("addons")
# CONTRIB SCRIPTS: good for testing but not official scripts yet
# if folder addons_contrib/ exists, scripts in there will be loaded too
- paths += _bpy.utils.script_paths("addons_contrib")
+ addon_paths += _bpy.utils.script_paths("addons_contrib")
# EXTERN SCRIPTS: external projects scripts
# if folder addons_extern/ exists, scripts in there will be loaded too
- paths += _bpy.utils.script_paths("addons_extern")
+ addon_paths += _bpy.utils.script_paths("addons_extern")
- return paths
+ return addon_paths
def modules(module_cache):
diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py
index 442d257b237..d5abcb03164 100644
--- a/release/scripts/modules/bpy/utils.py
+++ b/release/scripts/modules/bpy/utils.py
@@ -281,10 +281,7 @@ def script_paths(subdir=None, user_pref=True, check_all=False):
prefs = _bpy.context.user_preferences
# add user scripts dir
- if user_pref:
- user_script_path = prefs.filepaths.script_directory
- else:
- user_script_path = None
+ user_script = prefs.filepaths.script_directory if user_pref else None
if check_all:
# all possible paths
@@ -294,7 +291,7 @@ def script_paths(subdir=None, user_pref=True, check_all=False):
# only paths blender uses
base_paths = _bpy_script_paths()
- for path in base_paths + (user_script_path, ):
+ for path in base_paths + (user_script, ):
if path:
path = _os.path.normpath(path)
if path not in scripts and _os.path.isdir(path):
@@ -303,13 +300,13 @@ def script_paths(subdir=None, user_pref=True, check_all=False):
if subdir is None:
return scripts
- script_paths = []
+ scripts_subdir = []
for path in scripts:
path_subdir = _os.path.join(path, subdir)
if _os.path.isdir(path_subdir):
- script_paths.append(path_subdir)
+ scripts_subdir.append(path_subdir)
- return script_paths
+ return scripts_subdir
def refresh_script_paths():
@@ -464,7 +461,7 @@ def keyconfig_set(filepath):
keyconfigs.active = kc_new
-def user_resource(type, path="", create=False):
+def user_resource(resource_type, path="", create=False):
"""
Return a user resource path (normally from the users home directory).
@@ -479,7 +476,7 @@ def user_resource(type, path="", create=False):
:rtype: string
"""
- target_path = _user_resource(type, path)
+ target_path = _user_resource(resource_type, path)
if create:
# should always be true.