[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46585] trunk/blender/release/scripts/ startup/bl_operators/wm.py: fix [#31428] bpy.ops.wm. path_open only works once
Campbell Barton
ideasman42 at gmail.com
Sat May 12 23:11:48 CEST 2012
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):
More information about the Bf-blender-cvs
mailing list