diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-14 15:08:57 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-14 15:08:57 +0300 |
commit | bfbabc0592b820ec948fa355805ed78a882f4943 (patch) | |
tree | 99ce02e98f051e85f49b5901797ca9511254d20b /io_anim_bvh/__init__.py | |
parent | a32177f76b250183612ac2f38ec29157b4f88c1d (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_anim_bvh/__init__.py')
-rw-r--r-- | io_anim_bvh/__init__.py | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/io_anim_bvh/__init__.py b/io_anim_bvh/__init__.py index a4a42a99..9ad366e1 100644 --- a/io_anim_bvh/__init__.py +++ b/io_anim_bvh/__init__.py @@ -21,7 +21,7 @@ bl_info = { "name": "BioVision Motion Capture (BVH) format", "author": "Campbell Barton", - "blender": (2, 57, 0), + "blender": (2, 73, 0), "location": "File > Import-Export", "description": "Import-Export BVH from armature objects", "warning": "", @@ -46,11 +46,12 @@ from bpy.props import (StringProperty, ) from bpy_extras.io_utils import (ImportHelper, ExportHelper, + IOHelperOrientation, axis_conversion, ) -class ImportBVH(bpy.types.Operator, ImportHelper): +class ImportBVH(bpy.types.Operator, ImportHelper, IOHelperOrientation): """Load a BVH motion capture file""" bl_idname = "import_anim.bvh" bl_label = "Import BVH" @@ -108,30 +109,6 @@ class ImportBVH(bpy.types.Operator, ImportHelper): default='NATIVE', ) - 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='-Z', - ) - - 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='Y', - ) - def execute(self, context): keywords = self.as_keywords(ignore=("axis_forward", "axis_up", |