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/export_ply.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/export_ply.py')
-rw-r--r--io_mesh_ply/export_ply.py33
1 files changed, 13 insertions, 20 deletions
diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py
index 8424bb36..693d2f3d 100644
--- a/io_mesh_ply/export_ply.py
+++ b/io_mesh_ply/export_ply.py
@@ -21,20 +21,12 @@
"""
This script exports Stanford PLY files from Blender. It supports normals,
colors, and texture coordinates per face or per vertex.
-Only one mesh can be exported at a time.
"""
-import bpy
-import os
-
-def save_mesh(
- filepath,
- mesh,
- use_normals=True,
- use_uv_coords=True,
- use_colors=True,
-):
+def save_mesh(filepath, mesh, use_normals=True, use_uv_coords=True, use_colors=True):
+ import os
+ import bpy
def rvec3d(v):
return round(v[0], 6), round(v[1], 6), round(v[2], 6)
@@ -186,16 +178,17 @@ def save_mesh(
def save(
- operator,
- context,
- filepath="",
- use_selection=False,
- use_mesh_modifiers=True,
- use_normals=True,
- use_uv_coords=True,
- use_colors=True,
- global_matrix=None
+ operator,
+ context,
+ filepath="",
+ use_selection=False,
+ use_mesh_modifiers=True,
+ use_normals=True,
+ use_uv_coords=True,
+ use_colors=True,
+ global_matrix=None
):
+ import bpy
import bmesh
if bpy.ops.object.mode_set.poll():