diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-25 13:09:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-25 13:09:46 +0400 |
commit | d71455d4c1534a1949f6fb0e6ab0fcb1ceb7c2f8 (patch) | |
tree | 1ab3c49dd272c80edf473f5fa4ffd8250ec848bc /io_mesh_ply | |
parent | 48c9da843c40ff8a97b462d8539185b662ba1567 (diff) |
switch vector multiplication order & some style changes.
Diffstat (limited to 'io_mesh_ply')
-rw-r--r-- | io_mesh_ply/__init__.py | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py index e8384923..50edb885 100644 --- a/io_mesh_ply/__init__.py +++ b/io_mesh_ply/__init__.py @@ -16,7 +16,7 @@ # # ##### END GPL LICENSE BLOCK ##### -# <pep8 compliant> +# <pep8-80 compliant> bl_info = { "name": "Stanford PLY format", @@ -32,7 +32,8 @@ bl_info = { "support": 'OFFICIAL', "category": "Import-Export"} -# To support reload properly, try to access a package var, if it's there, reload everything +# To support reload properly, try to access a package var, +# if it's there, reload everything if "bpy" in locals(): import imp if "export_ply" in locals(): @@ -63,7 +64,8 @@ class ImportPLY(bpy.types.Operator, ImportHelper): filter_glob = StringProperty(default="*.ply", options={'HIDDEN'}) def execute(self, context): - paths = [os.path.join(self.directory, name.name) for name in self.files] + paths = [os.path.join(self.directory, name.name) + for name in self.files] if not paths: paths.append(self.filepath) @@ -76,17 +78,33 @@ class ImportPLY(bpy.types.Operator, ImportHelper): class ExportPLY(bpy.types.Operator, ExportHelper): - '''Export a single object as a stanford PLY with normals, colours and texture coordinates.''' + '''Export a single object as a stanford PLY with normals, ''' \ + '''colours and texture coordinates.''' bl_idname = "export_mesh.ply" bl_label = "Export PLY" filename_ext = ".ply" filter_glob = StringProperty(default="*.ply", options={'HIDDEN'}) - use_modifiers = BoolProperty(name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default=True) - use_normals = BoolProperty(name="Normals", description="Export Normals for smooth and hard shaded faces", default=True) - use_uv_coords = BoolProperty(name="UVs", description="Exort the active UV layer", default=True) - use_colors = BoolProperty(name="Vertex Colors", description="Exort the active vertex color layer", default=True) + use_modifiers = BoolProperty( + name="Apply Modifiers", + description="Apply Modifiers to the exported mesh", + default=True, + ) + use_normals = BoolProperty( + name="Normals", + description="Export Normals for smooth and hard shaded faces", + default=True, + ) + use_uv_coords = BoolProperty( + name="UVs", + description="Export the active UV layer", + default=True, + ) + use_colors = BoolProperty( + name="Vertex Colors", + description="Exort the active vertex color layer", + default=True) @classmethod def poll(cls, context): @@ -96,7 +114,8 @@ class ExportPLY(bpy.types.Operator, ExportHelper): filepath = self.filepath filepath = bpy.path.ensure_ext(filepath, self.filename_ext) from . import export_ply - return export_ply.save(self, context, **self.as_keywords(ignore=("check_existing", "filter_glob"))) + keywords = **self.as_keywords(ignore=("check_existing", "filter_glob")) + return export_ply.save(self, context, keywords) def draw(self, context): layout = self.layout |