diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-09-13 20:40:32 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-09-13 20:40:32 +0400 |
commit | aeb4cb010eb497e3c511edcad05e8d8831a1ca12 (patch) | |
tree | 4404d8b292c17d7ebf7f158780655771cf2ded1d /io_scene_fbx_experimental | |
parent | 307d64fa685030ebbeaaa5d8848d924b830b6101 (diff) |
Fix T41808: FBX exporter does not properly position and rotate group instances
Forward/Up axes to FBX system was still wrong. Not happy with finding such issue
at this stage of development. :/ Hopefully now we are OK (at least, checked
all orientations with same basice file in Unity, all were imported OK).
Diffstat (limited to 'io_scene_fbx_experimental')
-rw-r--r-- | io_scene_fbx_experimental/fbx_utils.py | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/io_scene_fbx_experimental/fbx_utils.py b/io_scene_fbx_experimental/fbx_utils.py index f0eeca03..369d9ab4 100644 --- a/io_scene_fbx_experimental/fbx_utils.py +++ b/io_scene_fbx_experimental/fbx_utils.py @@ -100,31 +100,30 @@ FBX_LIGHT_DECAY_TYPES = { RIGHT_HAND_AXES = { # Up, Front -> FBX values (tuples of (axis, sign), Up, Front, Coord). - # Note: Since we always stay in right-handed system, third coord sign is always positive! - ('X', 'Y'): ((0, 1), (1, -1), (2, 1)), - ('X', '-Y'): ((0, 1), (1, 1), (2, 1)), - ('X', 'Z'): ((0, 1), (2, -1), (1, 1)), - ('X', '-Z'): ((0, 1), (2, 1), (1, 1)), - ('-X', 'Y'): ((0, -1), (1, -1), (2, 1)), - ('-X', '-Y'): ((0, -1), (1, 1), (2, 1)), - ('-X', 'Z'): ((0, -1), (2, -1), (1, 1)), - ('-X', '-Z'): ((0, -1), (2, 1), (1, 1)), - ('Y', 'X'): ((1, 1), (0, -1), (2, 1)), - ('Y', '-X'): ((1, 1), (0, 1), (2, 1)), - ('Y', 'Z'): ((1, 1), (2, -1), (0, 1)), - ('Y', '-Z'): ((1, 1), (2, 1), (0, 1)), - ('-Y', 'X'): ((1, -1), (0, -1), (2, 1)), - ('-Y', '-X'): ((1, -1), (0, 1), (2, 1)), - ('-Y', 'Z'): ((1, -1), (2, -1), (0, 1)), - ('-Y', '-Z'): ((1, -1), (2, 1), (0, 1)), - ('Z', 'X'): ((2, 1), (0, -1), (1, 1)), - ('Z', '-X'): ((2, 1), (0, 1), (1, 1)), - ('Z', 'Y'): ((2, 1), (1, -1), (0, 1)), # Blender system! - ('Z', '-Y'): ((2, 1), (1, 1), (0, 1)), - ('-Z', 'X'): ((2, -1), (0, -1), (1, 1)), - ('-Z', '-X'): ((2, -1), (0, 1), (1, 1)), - ('-Z', 'Y'): ((2, -1), (1, -1), (0, 1)), - ('-Z', '-Y'): ((2, -1), (1, 1), (0, 1)), + ('X', 'Y'): ((0, 1), (1, 1), (2, 1)), + ('X', '-Y'): ((0, 1), (1, -1), (2, -1)), + ('X', 'Z'): ((0, 1), (2, 1), (1, -1)), + ('X', '-Z'): ((0, 1), (2, -1), (1, 1)), + ('-X', 'Y'): ((0, -1), (1, 1), (2, -1)), + ('-X', '-Y'): ((0, -1), (1, -1), (2, 1)), + ('-X', 'Z'): ((0, -1), (2, 1), (1, 1)), + ('-X', '-Z'): ((0, -1), (2, -1), (1, -1)), + ('Y', 'X'): ((1, 1), (0, 1), (2, -1)), + ('Y', '-X'): ((1, 1), (0, -1), (2, 1)), + ('Y', 'Z'): ((1, 1), (2, 1), (0, 1)), + ('Y', '-Z'): ((1, 1), (2, -1), (0, -1)), + ('-Y', 'X'): ((1, -1), (0, 1), (2, 1)), + ('-Y', '-X'): ((1, -1), (0, -1), (2, -1)), + ('-Y', 'Z'): ((1, -1), (2, 1), (0, -1)), + ('-Y', '-Z'): ((1, -1), (2, -1), (0, 1)), + ('Z', 'X'): ((2, 1), (0, 1), (1, 1)), + ('Z', '-X'): ((2, 1), (0, -1), (1, -1)), + ('Z', 'Y'): ((2, 1), (1, 1), (0, -1)), + ('Z', '-Y'): ((2, 1), (1, -1), (0, 1)), # Blender system! + ('-Z', 'X'): ((2, -1), (0, 1), (1, -1)), + ('-Z', '-X'): ((2, -1), (0, -1), (1, 1)), + ('-Z', 'Y'): ((2, -1), (1, 1), (0, 1)), + ('-Z', '-Y'): ((2, -1), (1, -1), (0, -1)), } |