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:
authorDalai Felinto <dfelinto@gmail.com>2018-09-28 21:57:39 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-09-28 21:58:23 +0300
commit345d7ace8756781708ae2dd3f8912be498ebffff (patch)
tree6766012c85ed760f58bc28a380fd82ff531bd188 /io_scene_x3d
parentcd90aa081b33a579f12f2b4a9f1452ce68c6d2c4 (diff)
Use orientation_helper decorator
The warnings in the console are getting on the way. May as well update the addons even if they are still mostly not ported to 2.8. We can probably ditch orientation_helper_factory altogether.
Diffstat (limited to 'io_scene_x3d')
-rw-r--r--io_scene_x3d/__init__.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py
index f3db0e15..06a9a122 100644
--- a/io_scene_x3d/__init__.py
+++ b/io_scene_x3d/__init__.py
@@ -48,16 +48,14 @@ from bpy.props import (
from bpy_extras.io_utils import (
ImportHelper,
ExportHelper,
- orientation_helper_factory,
+ orientation_helper,
axis_conversion,
path_reference_mode,
)
-IOX3DOrientationHelper = orientation_helper_factory("IOX3DOrientationHelper", axis_forward='Z', axis_up='Y')
-
-
-class ImportX3D(bpy.types.Operator, ImportHelper, IOX3DOrientationHelper):
+@orientation_helper(axis_forward='Z', axis_up='Y')
+class ImportX3D(bpy.types.Operator, ImportHelper):
"""Import an X3D or VRML2 file"""
bl_idname = "import_scene.x3d"
bl_label = "Import X3D/VRML2"
@@ -81,7 +79,8 @@ class ImportX3D(bpy.types.Operator, ImportHelper, IOX3DOrientationHelper):
return import_x3d.load(context, **keywords)
-class ExportX3D(bpy.types.Operator, ExportHelper, IOX3DOrientationHelper):
+@orientation_helper(axis_forward='Z', axis_up='Y')
+class ExportX3D(bpy.types.Operator, ExportHelper):
"""Export selection to Extensible 3D file (.x3d)"""
bl_idname = "export_scene.x3d"
bl_label = 'Export X3D'