From 107df683a03280ed9cdeb329b7766bef2943991c Mon Sep 17 00:00:00 2001
From: Bastien Montagne <montagne29@wanadoo.fr>
Date: Wed, 24 Jun 2015 20:12:59 +0200
Subject: [PATCH] Fix T45176: FBX import - mismatch in camera rotation (bad
 rotation order).

Somehow our mapping from FBX int 'enum' code to string representation of rotation order
was pure nonsense, only giving correct result for default 'XYZ'.

Note that we fallback to EulerXYZ in case of 'SphericXYZ', not even sure what this is!
---
 io_scene_fbx/__init__.py   |  2 +-
 io_scene_fbx/import_fbx.py | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 92b32af37..2bde95a21 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -21,7 +21,7 @@
 bl_info = {
     "name": "FBX format",
     "author": "Campbell Barton, Bastien Montagne, Jens Restemeier",
-    "version": (3, 3, 4),
+    "version": (3, 3, 5),
     "blender": (2, 74, 0),
     "location": "File > Import-Export",
     "description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions",
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index 2eaf2f95d..ed8716a20 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -478,12 +478,12 @@ def blen_read_object_transform_preprocess(fbx_props, fbx_obj, rot_alt_mat, use_p
             pst_rot = const_vector_zero_3d
         rot_ord = {
             0: 'XYZ',
-            1: 'XYZ',
-            2: 'XZY',
-            3: 'YZX',
-            4: 'YXZ',
-            5: 'ZXY',
-            6: 'ZYX',
+            1: 'XZY',
+            2: 'YZX',
+            3: 'YXZ',
+            4: 'ZXY',
+            5: 'ZYX',
+            6: 'XYZ',  # XXX eSphericXYZ, not really supported...
             }.get(elem_props_get_enum(fbx_props, b'RotationOrder', 0))
     else:
         pre_rot = const_vector_zero_3d
-- 
GitLab