bpy_extras.io_utils.axis_conversion() was returning wrong matrix.

This commit is contained in:
Campbell Barton 2011-05-24 08:11:51 +00:00
parent 2ccdcca7f5
commit 4a989282d4

View 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])