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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-16 06:48:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-16 06:50:00 +0300
commit2896ce7bc793908f2ee054c2c5e1f58e9c6e8dce (patch)
treee033f2689f1bca24f75da25b99b6b96c9c219109 /release
parentc9c23a3e44c0648d37396bbb19236e881d33e2cc (diff)
Fix using non-euler cursor orientation
Missed in 06fe2a5e0c5d6
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy_extras/object_utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py
index 48cdbb41c50..3a751a7b907 100644
--- a/release/scripts/modules/bpy_extras/object_utils.py
+++ b/release/scripts/modules/bpy_extras/object_utils.py
@@ -80,7 +80,8 @@ def add_object_align_init(context, operator):
rotation.resize_4x4()
properties.rotation = rotation.to_euler()
elif properties.align == 'CURSOR':
- rotation = context.scene.cursor.rotation_euler.to_matrix().to_4x4()
+ rotation = context.scene.cursor.matrix
+ rotation.col[3][0:3] = 0.0, 0.0, 0.0
properties.rotation = rotation.to_euler()
else:
rotation = properties.rotation.to_matrix().to_4x4()