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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-01-14 15:08:57 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-01-14 15:08:57 +0300
commitbfbabc0592b820ec948fa355805ed78a882f4943 (patch)
tree99ce02e98f051e85f49b5901797ca9511254d20b /io_mesh_ply
parenta32177f76b250183612ac2f38ec29157b4f88c1d (diff)
Use new IOHelperOrientation class to handle forward/up axes.
Helps ensuring common behavior, and saves quite a few lines of code, too...
Diffstat (limited to 'io_mesh_ply')
-rw-r--r--io_mesh_ply/__init__.py27
1 files changed, 3 insertions, 24 deletions
diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py
index f0854821..887c354e 100644
--- a/io_mesh_ply/__init__.py
+++ b/io_mesh_ply/__init__.py
@@ -21,7 +21,7 @@
bl_info = {
"name": "Stanford PLY format",
"author": "Bruce Merry, Campbell Barton",
- "blender": (2, 57, 0),
+ "blender": (2, 73, 0),
"location": "File > Import-Export",
"description": "Import-Export PLY mesh data withs UV's and vertex colors",
"warning": "",
@@ -53,6 +53,7 @@ from bpy.props import (CollectionProperty,
)
from bpy_extras.io_utils import (ImportHelper,
ExportHelper,
+ IOHelperOrientation,
axis_conversion,
)
@@ -87,7 +88,7 @@ class ImportPLY(bpy.types.Operator, ImportHelper):
return {'FINISHED'}
-class ExportPLY(bpy.types.Operator, ExportHelper):
+class ExportPLY(bpy.types.Operator, ExportHelper, IOHelperOrientation):
"""Export a single object as a Stanford PLY with normals, """ \
"""colors and texture coordinates"""
bl_idname = "export_mesh.ply"
@@ -120,28 +121,6 @@ class ExportPLY(bpy.types.Operator, ExportHelper):
default=True,
)
- axis_forward = EnumProperty(
- name="Forward",
- items=(('X', "X Forward", ""),
- ('Y', "Y Forward", ""),
- ('Z', "Z Forward", ""),
- ('-X', "-X Forward", ""),
- ('-Y', "-Y Forward", ""),
- ('-Z', "-Z Forward", ""),
- ),
- default='Y',
- )
- axis_up = EnumProperty(
- name="Up",
- items=(('X', "X Up", ""),
- ('Y', "Y Up", ""),
- ('Z', "Z Up", ""),
- ('-X', "-X Up", ""),
- ('-Y', "-Y Up", ""),
- ('-Z', "-Z Up", ""),
- ),
- default='Z',
- )
global_scale = FloatProperty(
name="Scale",
min=0.01, max=1000.0,