diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-03-24 11:59:35 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-03-24 11:59:35 +0300 |
commit | 812130fd0b0a54df16f233e78af176868e8deae6 (patch) | |
tree | e634b0156daaa07f823050c704a491639ece4d41 /io_mesh_stl | |
parent | b1a53b343db65812416f5a877317a5e6bb69afa0 (diff) |
Fix T44089: restore default orientation axes of each addons to stae before rBAbfbabc0592b8.
Now using a class factory to allow customization of those defaults axes, still way less
verbose than previous code!
Diffstat (limited to 'io_mesh_stl')
-rw-r--r-- | io_mesh_stl/__init__.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/io_mesh_stl/__init__.py b/io_mesh_stl/__init__.py index 56d56289..6c97db1b 100644 --- a/io_mesh_stl/__init__.py +++ b/io_mesh_stl/__init__.py @@ -22,7 +22,7 @@ bl_info = { "name": "STL format", "author": "Guillaume Bouchard (Guillaum)", "version": (1, 1, 1), - "blender": (2, 73, 0), + "blender": (2, 74, 0), "location": "File > Import-Export > Stl", "description": "Import-Export STL files", "warning": "", @@ -65,13 +65,16 @@ from bpy.props import (StringProperty, ) from bpy_extras.io_utils import (ImportHelper, ExportHelper, - OrientationHelper, + orientation_helper_factory, axis_conversion, ) from bpy.types import Operator, OperatorFileListElement -class ImportSTL(Operator, ImportHelper, OrientationHelper): +IOSTLOrientationHelper = orientation_helper_factory("IOSTLOrientationHelper", axis_forward='Y', axis_up='Z') + + +class ImportSTL(Operator, ImportHelper, IOSTLOrientationHelper): """Load STL triangle mesh data""" bl_idname = "import_mesh.stl" bl_label = "Import STL" @@ -140,7 +143,7 @@ class ImportSTL(Operator, ImportHelper, OrientationHelper): return {'FINISHED'} -class ExportSTL(Operator, ExportHelper, OrientationHelper): +class ExportSTL(Operator, ExportHelper, IOSTLOrientationHelper): """Save STL triangle mesh data from the active object""" bl_idname = "export_mesh.stl" bl_label = "Export STL" |