bpy_extras.io_utils.axis_conversion() was returning wrong matrix.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 24 May 2011 08:11:51 +0000 (08:11 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 24 May 2011 08:11:51 +0000 (08:11 +0000)
release/scripts/modules/bpy_extras/io_utils.py

index 820d7cfa39d18b1dd4d65d7a18f16a514508e610..dcc5d9ecec04d07b628b7718d942a35244ac7ce8 100644 (file)
@@ -140,7 +140,8 @@ def axis_conversion(from_forward='Y', from_up='Z', to_forward='Y', to_up='Z'):
     if from_forward == to_forward and from_up == to_up:
         return Matrix().to_3x3()
 
-    value = reduce(int.__or__, (_axis_convert_num[a] << (i * 3) for i, a in enumerate((from_forward, from_up, to_forward, to_up))))
+    value = reduce(int.__or__, (_axis_convert_num[a] << (i * 3) for i, a in enumerate((from_up, from_forward, to_up, to_forward))))
+
     for i, axis_lut in enumerate(_axis_convert_lut):
         if value in axis_lut:
             return Matrix(_axis_convert_matrix[i])