[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31946] trunk/blender/release/scripts/ modules: bugfix [#23833] Console Errors (Keymaps)

Campbell Barton ideasman42 at gmail.com
Wed Sep 15 15:41:38 CEST 2010


Revision: 31946
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31946
Author:   campbellbarton
Date:     2010-09-15 15:41:38 +0200 (Wed, 15 Sep 2010)

Log Message:
-----------
bugfix [#23833] Console Errors (Keymaps)
dont allow non-existing preset paths to be passed to the preset menu.

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/bpy/utils.py
    trunk/blender/release/scripts/modules/bpy_types.py

Modified: trunk/blender/release/scripts/modules/bpy/utils.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/utils.py	2010-09-15 13:22:36 UTC (rev 31945)
+++ trunk/blender/release/scripts/modules/bpy/utils.py	2010-09-15 13:41:38 UTC (rev 31946)
@@ -271,10 +271,14 @@
     """
     Returns a list of paths for a specific preset.
     """
+    dirs = []
+    for path in script_paths("presets"):
+        directory = _os.path.join(path, subdir)
+        if _os.path.isdir(directory):
+            dirs.append(directory)
+    return dirs
 
-    return (_os.path.join(_presets, subdir), )
 
-
 def smpte_from_seconds(time, fps=None):
     """
     Returns an SMPTE formatted string from the time in seconds: "HH:MM:SS:FF".

Modified: trunk/blender/release/scripts/modules/bpy_types.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy_types.py	2010-09-15 13:22:36 UTC (rev 31945)
+++ trunk/blender/release/scripts/modules/bpy_types.py	2010-09-15 13:41:38 UTC (rev 31946)
@@ -739,6 +739,9 @@
         import bpy.utils
 
         layout = self.layout
+        
+        if not searchpaths:
+            layout.label("* Missing Paths *")
 
         # collect paths
         files = []





More information about the Bf-blender-cvs mailing list