[Bf-extensions-cvs] [e9ada0c8] master: PLY Cleanup: formatting

Mikhail Rachinskiy noreply at git.blender.org
Wed Jul 15 04:05:31 CEST 2020


Commit: e9ada0c8e31cf0f4329f8ecc90c4fb970cbf948b
Author: Mikhail Rachinskiy
Date:   Wed Jul 15 06:04:42 2020 +0400
Branches: master
https://developer.blender.org/rBAe9ada0c8e31cf0f4329f8ecc90c4fb970cbf948b

PLY Cleanup: formatting

===================================================================

M	io_mesh_ply/__init__.py
M	io_mesh_ply/import_ply.py

===================================================================

diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py
index 79b8dc38..835ae60e 100644
--- a/io_mesh_ply/__init__.py
+++ b/io_mesh_ply/__init__.py
@@ -52,7 +52,7 @@ from bpy_extras.io_utils import (
     ImportHelper,
     ExportHelper,
     axis_conversion,
-    orientation_helper
+    orientation_helper,
 )
 
 
@@ -64,11 +64,9 @@ class ImportPLY(bpy.types.Operator, ImportHelper):
 
     files: CollectionProperty(
         name="File Path",
-        description=(
-            "File path used for importing "
-            "the PLY file"
-        ),
-        type=bpy.types.OperatorFileListElement)
+        description="File path used for importing the PLY file",
+        type=bpy.types.OperatorFileListElement,
+    )
 
     # Hide opertator properties, rest of this is managed in C. See WM_operator_properties_filesel().
     hide_props_region: BoolProperty(
@@ -84,14 +82,16 @@ class ImportPLY(bpy.types.Operator, ImportHelper):
 
     def execute(self, context):
         import os
+        from . import import_ply
+
+        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)
 
-        from . import import_ply
-
         for path in paths:
             import_ply.load(self, context, path)
 
@@ -120,10 +120,8 @@ class ExportPLY(bpy.types.Operator, ExportHelper):
     use_normals: BoolProperty(
         name="Normals",
         description=(
-            "Export Normals for smooth and "
-            "hard shaded faces "
-            "(hard shaded faces will be exported "
-            "as individual faces)"
+            "Export Normals for smooth and hard shaded faces "
+            "(hard shaded faces will be exported as individual faces)"
         ),
         default=True,
     )
@@ -137,17 +135,16 @@ class ExportPLY(bpy.types.Operator, ExportHelper):
         description="Export the active vertex color layer",
         default=True,
     )
-
     global_scale: FloatProperty(
         name="Scale",
-        min=0.01, max=1000.0,
+        min=0.01,
+        max=1000.0,
         default=1.0,
     )
 
     def execute(self, context):
-        from . import export_ply
-
         from mathutils import Matrix
+        from . import export_ply
 
         keywords = self.as_keywords(
             ignore=(
diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py
index c7981cc3..6df2ec81 100644
--- a/io_mesh_ply/import_ply.py
+++ b/io_mesh_ply/import_ply.py
@@ -275,7 +275,7 @@ def load_ply_mesh(filepath, ply_name):
                        vertices[index][colindices[0]] * colmultiply[0],
                        vertices[index][colindices[1]] * colmultiply[1],
                        vertices[index][colindices[2]] * colmultiply[2],
-                       1.0
+                       1.0,
                     )
                     for index in indices
                 ])



More information about the Bf-extensions-cvs mailing list