[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31700] trunk/blender/release/scripts/ modules/io_utils.py: * add missing imports
Nathan Letwory
nathan at letworyinteractive.com
Wed Sep 1 15:55:41 CEST 2010
Revision: 31700
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31700
Author: jesterking
Date: 2010-09-01 15:55:41 +0200 (Wed, 01 Sep 2010)
Log Message:
-----------
* add missing imports
* fix indentation: tabs -> spaces
Modified Paths:
--------------
trunk/blender/release/scripts/modules/io_utils.py
Modified: trunk/blender/release/scripts/modules/io_utils.py
===================================================================
--- trunk/blender/release/scripts/modules/io_utils.py 2010-09-01 13:41:53 UTC (rev 31699)
+++ trunk/blender/release/scripts/modules/io_utils.py 2010-09-01 13:55:41 UTC (rev 31700)
@@ -18,32 +18,34 @@
# <pep8 compliant>
+import bpy
from bpy.props import *
class ExportHelper:
- filepath = StringProperty(name="File Path", description="Filepath used for exporting the file", maxlen= 1024, default= "", subtype='FILE_PATH')
- check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
+ filepath = StringProperty(name="File Path", description="Filepath used for exporting the file", maxlen= 1024, default= "", subtype='FILE_PATH')
+ check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
- def invoke(self, context, event):
- import os
- if not self.properties.is_property_set("filepath"):
- self.properties.filepath = os.path.splitext(context.main.filepath)[0] + self.filename_ext
+ def invoke(self, context, event):
+ import os
+ if not self.properties.is_property_set("filepath"):
+ self.properties.filepath = os.path.splitext(context.main.filepath)[0] + self.filename_ext
- context.manager.add_fileselect(self)
- return {'RUNNING_MODAL'}
+ context.manager.add_fileselect(self)
+ return {'RUNNING_MODAL'}
class ImportHelper:
- filepath = StringProperty(name="File Path", description="Filepath used for importing the file", maxlen= 1024, default= "", subtype='FILE_PATH')
+ filepath = StringProperty(name="File Path", description="Filepath used for importing the file", maxlen= 1024, default= "", subtype='FILE_PATH')
- def invoke(self, context, event):
- wm = context.manager
- wm.add_fileselect(self)
- return {'RUNNING_MODAL'}
+ def invoke(self, context, event):
+ wm = context.manager
+ wm.add_fileselect(self)
+ return {'RUNNING_MODAL'}
# limited replacement for BPyImage.comprehensiveImageLoad
def load_image(imagepath, dirname):
+ import os
if os.path.exists(imagepath):
return bpy.data.images.load(imagepath)
@@ -98,4 +100,4 @@
flat_ls[i:i + len(t)] = t
i += 4
- return flat_ls
\ No newline at end of file
+ return flat_ls
More information about the Bf-blender-cvs
mailing list