Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--space_view3d_copy_attributes.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/space_view3d_copy_attributes.py b/space_view3d_copy_attributes.py
index 7f90ebe4..a80fd700 100644
--- a/space_view3d_copy_attributes.py
+++ b/space_view3d_copy_attributes.py
@@ -114,8 +114,9 @@ def rotcopy(item, mat):
if item.rotation_mode == 'QUATERNION':
item.rotation_quaternion = mat.to_3x3().to_quaternion()
elif item.rotation_mode == 'AXIS_ANGLE':
- quat = mat.to_3x3().to_quaternion()
- item.rotation_axis_angle = quat.axis[:] + (quat.angle, )
+ rot = mat.to_3x3().to_quaternion().to_axis_angle() # returns (Vector((x, y, z)), w)
+ axis_angle = rot[1], rot[0][0], rot[0][1], rot[0][2] # convert to w, x, y, z
+ item.rotation_axis_angle = axis_angle
else:
item.rotation_euler = mat.to_3x3().to_euler(item.rotation_mode)