diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-03-24 11:59:35 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-24 18:04:23 +0300 |
commit | aa8d2c48543bb9b277f7ce58d6a6875144eb12c0 (patch) | |
tree | 3cbd6cbbe560f701136461d1fa06615391ad137b /io_mesh_stl/__init__.py | |
parent | 06adc998b17cc6505b22ff3ade04c559693aea29 (diff) |
Fix T44089: restore default orientation axes of each addons to stae before rBAbfbabc0592b8.v2.74-rc3
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/__init__.py')
-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" |