diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-14 07:53:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-14 07:53:45 +0400 |
commit | 2246e5b59719500a8d15cdd17fa81c7c104ec28a (patch) | |
tree | e1a80d84900bbc7db7d46564e8fa870a1fd41c79 /io_mesh_raw | |
parent | 248b8c9a94710a4cf9d378c835a474ed57f7da82 (diff) |
update for changes in trunk
Diffstat (limited to 'io_mesh_raw')
-rw-r--r-- | io_mesh_raw/__init__.py | 4 | ||||
-rw-r--r-- | io_mesh_raw/export_raw.py | 8 | ||||
-rw-r--r-- | io_mesh_raw/import_raw.py | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/io_mesh_raw/__init__.py b/io_mesh_raw/__init__.py index 74b11176..cab63b04 100644 --- a/io_mesh_raw/__init__.py +++ b/io_mesh_raw/__init__.py @@ -34,13 +34,13 @@ import bpy def menu_import(self, context): from io_mesh_raw import import_raw - self.layout.operator(import_raw.RawImporter.bl_idname, text="Raw Faces (.raw)").path = "*.raw" + self.layout.operator(import_raw.RawImporter.bl_idname, text="Raw Faces (.raw)").filepath = "*.raw" def menu_export(self, context): from io_mesh_raw import export_raw default_path = bpy.data.filepath.replace(".blend", ".raw") - self.layout.operator(export_raw.RawExporter.bl_idname, text="Raw Faces (.raw)").path = default_path + self.layout.operator(export_raw.RawExporter.bl_idname, text="Raw Faces (.raw)").filepath = default_path def register(): diff --git a/io_mesh_raw/export_raw.py b/io_mesh_raw/export_raw.py index e94e26bb..f0217144 100644 --- a/io_mesh_raw/export_raw.py +++ b/io_mesh_raw/export_raw.py @@ -61,7 +61,7 @@ def faceToLine(face): return line[:-1] + "\n" -def export_raw(path, applyMods, triangulate): +def export_raw(filepath, applyMods, triangulate): faces = [] for obj in bpy.context.selected_objects: if obj.type == 'MESH': @@ -80,7 +80,7 @@ def export_raw(path, applyMods, triangulate): faces.append(fv) # write the faces to a file - file = open(path, "w") + file = open(filepath, "w") for face in faces: file.write(faceToLine(face)) file.close() @@ -94,7 +94,7 @@ class RawExporter(bpy.types.Operator): bl_idname = "export_mesh.raw" bl_label = "Export RAW" - path = StringProperty(name="File Path", description="File path used for exporting the RAW file", maxlen= 1024, default= "") + filepath = StringProperty(name="File Path", description="Filepath used for exporting the RAW file", maxlen= 1024, default= "") filename = StringProperty(name="File Name", description="Name of the file.") directory = StringProperty(name="Directory", description="Directory of the file.") check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'}) @@ -103,7 +103,7 @@ class RawExporter(bpy.types.Operator): triangulate = BoolProperty(name="Triangulate", description="Triangulate quads.", default=True) def execute(self, context): - export_raw(self.properties.path, self.properties.apply_modifiers, self.properties.triangulate) + export_raw(self.properties.filepath, self.properties.apply_modifiers, self.properties.triangulate) return {'FINISHED'} def invoke(self, context, event): diff --git a/io_mesh_raw/import_raw.py b/io_mesh_raw/import_raw.py index e4bbf6ed..96b0c653 100644 --- a/io_mesh_raw/import_raw.py +++ b/io_mesh_raw/import_raw.py @@ -119,7 +119,7 @@ class RawImporter(bpy.types.Operator): bl_idname = "import_mesh.raw" bl_label = "Import RAW" - path = StringProperty(name="File Path", description="File path used for importing the RAW file", maxlen=1024, default="") + filepath = StringProperty(name="File Path", description="Filepath used for importing the RAW file", maxlen=1024, default="") filename = StringProperty(name="File Name", description="Name of the file.") directory = StringProperty(name="Directory", description="Directory of the file.") @@ -128,7 +128,7 @@ class RawImporter(bpy.types.Operator): #convert the filename to an object name objName = bpy.utils.display_name(self.properties.filename) - mesh = readMesh(self.properties.path, objName) + mesh = readMesh(self.properties.filepath, objName) addMeshObj(mesh, objName) return {'FINISHED'} |