Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2019-10-15 12:17:58 +0300
committerMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2019-10-15 12:17:58 +0300
commit376fa84e78be926b2ee7ce2b86c25d737ed6ab21 (patch)
tree5e6b5e6ef869e13b4ce2a3a7361a40c815b03b6d /io_mesh_ply/__init__.py
parent5e7df9f7f2701929849aeb04fb706026c9809065 (diff)
PLY: code cleanup and PEP8
Unused imports, move rare imports inside functions, comment out unused codeblocks instead of docstring, use bl_description.
Diffstat (limited to 'io_mesh_ply/__init__.py')
-rw-r--r--io_mesh_ply/__init__.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py
index 6e2b16b3..28de08be 100644
--- a/io_mesh_ply/__init__.py
+++ b/io_mesh_ply/__init__.py
@@ -21,11 +21,10 @@
bl_info = {
"name": "Stanford PLY format",
"author": "Bruce Merry, Campbell Barton",
- "version": (1, 0, 0),
- "blender": (2, 81, 6),
+ "version": (1, 1, 0),
+ "blender": (2, 82, 0),
"location": "File > Import-Export",
"description": "Import-Export PLY mesh data with UV's and vertex colors",
- "warning": "",
"wiki_url": "https://docs.blender.org/manual/en/latest/addons/io_mesh_ply.html",
"support": 'OFFICIAL',
"category": "Import-Export",
@@ -34,8 +33,6 @@ bl_info = {
# Copyright (C) 2004, 2005: Bruce Merry, bmerry@cs.uct.ac.za
# Contributors: Bruce Merry, Campbell Barton
-# To support reload properly, try to access a package var,
-# if it's there, reload everything
if "bpy" in locals():
import importlib
if "export_ply" in locals():
@@ -44,13 +41,11 @@ if "bpy" in locals():
importlib.reload(import_ply)
-import os
import bpy
from bpy.props import (
CollectionProperty,
StringProperty,
BoolProperty,
- EnumProperty,
FloatProperty,
)
from bpy_extras.io_utils import (
@@ -81,6 +76,8 @@ class ImportPLY(bpy.types.Operator, ImportHelper):
filter_glob: StringProperty(default="*.ply", options={'HIDDEN'})
def execute(self, context):
+ import os
+
paths = [os.path.join(self.directory, name.name)
for name in self.files]
if not paths:
@@ -96,10 +93,9 @@ class ImportPLY(bpy.types.Operator, ImportHelper):
@orientation_helper(axis_forward='Y', axis_up='Z')
class ExportPLY(bpy.types.Operator, ExportHelper):
- """Export a single object as a Stanford PLY with normals, """ \
- """colors and texture coordinates"""
bl_idname = "export_mesh.ply"
bl_label = "Export PLY"
+ bl_description = "Export as a Stanford PLY with normals, vertex colors and texture coordinates"
filename_ext = ".ply"
filter_glob: StringProperty(default="*.ply", options={'HIDDEN'})