[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43482] trunk/blender: cleanup for redefined vars

Campbell Barton ideasman42 at gmail.com
Wed Jan 18 07:55:57 CET 2012


Revision: 43482
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43482
Author:   campbellbarton
Date:     2012-01-18 06:55:51 +0000 (Wed, 18 Jan 2012)
Log Message:
-----------
cleanup for redefined vars

Modified Paths:
--------------
    trunk/blender/build_files/cmake/project_info.py
    trunk/blender/build_files/cmake/project_source_info.py
    trunk/blender/release/scripts/modules/addon_utils.py
    trunk/blender/release/scripts/modules/bpy/utils.py

Modified: trunk/blender/build_files/cmake/project_info.py
===================================================================
--- trunk/blender/build_files/cmake/project_info.py	2012-01-18 06:11:56 UTC (rev 43481)
+++ trunk/blender/build_files/cmake/project_info.py	2012-01-18 06:55:51 UTC (rev 43482)
@@ -133,7 +133,7 @@
     """ Extracr includes and defines from cmake.
     """
 
-    def create_eclipse_project(CMAKE_DIR):
+    def create_eclipse_project():
         print("CMAKE_DIR %r" % CMAKE_DIR)
         if sys.platform == "win32":
             cmd = 'cmake "%s" -G"Eclipse CDT4 - MinGW Makefiles"' % CMAKE_DIR
@@ -145,7 +145,7 @@
     includes = []
     defines = []
 
-    create_eclipse_project(CMAKE_DIR)
+    create_eclipse_project()
 
     from xml.dom.minidom import parse
     tree = parse(join(CMAKE_DIR, ".cproject"))

Modified: trunk/blender/build_files/cmake/project_source_info.py
===================================================================
--- trunk/blender/build_files/cmake/project_source_info.py	2012-01-18 06:11:56 UTC (rev 43481)
+++ trunk/blender/build_files/cmake/project_source_info.py	2012-01-18 06:55:51 UTC (rev 43482)
@@ -160,7 +160,6 @@
 def queue_processes(process_funcs, job_total=-1):
     """ Takes a list of function arg pairs, each function must return a process
     """
-    import sys
 
     if job_total == -1:
         import multiprocessing

Modified: trunk/blender/release/scripts/modules/addon_utils.py
===================================================================
--- trunk/blender/release/scripts/modules/addon_utils.py	2012-01-18 06:11:56 UTC (rev 43481)
+++ trunk/blender/release/scripts/modules/addon_utils.py	2012-01-18 06:55:51 UTC (rev 43482)
@@ -38,17 +38,17 @@
 
 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):

Modified: trunk/blender/release/scripts/modules/bpy/utils.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/utils.py	2012-01-18 06:11:56 UTC (rev 43481)
+++ trunk/blender/release/scripts/modules/bpy/utils.py	2012-01-18 06:55:51 UTC (rev 43482)
@@ -281,10 +281,7 @@
     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 @@
         # 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 @@
     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 @@
     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 @@
     :rtype: string
     """
 
-    target_path = _user_resource(type, path)
+    target_path = _user_resource(resource_type, path)
 
     if create:
         # should always be true.




More information about the Bf-blender-cvs mailing list