Revision: 46585
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46585
Author:   campbellbarton
Date:     2012-05-12 21:11:48 +0000 (Sat, 12 May 2012)
Log Message:
-----------
fix [#31428] bpy.ops.wm.path_open only works once

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_operators/wm.py

Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/wm.py    2012-05-12 
21:01:26 UTC (rev 46584)
+++ trunk/blender/release/scripts/startup/bl_operators/wm.py    2012-05-12 
21:11:48 UTC (rev 46585)
@@ -764,6 +764,7 @@
 
     filepath = StringProperty(
             subtype='FILE_PATH',
+            options={'SKIP_SAVE'},
             )
 
     def execute(self, context):
@@ -771,7 +772,13 @@
         import os
         import subprocess
 
-        filepath = bpy.path.abspath(self.filepath)
+        filepath = self.filepath
+
+        if not filepath:
+            self.report({'ERROR'}, "File path was not set")
+            return {'CANCELLED'}
+
+        filepath = bpy.path.abspath(filepath)
         filepath = os.path.normpath(filepath)
 
         if not os.path.exists(filepath):

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to