diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-25 16:58:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-25 17:37:49 +0300 |
commit | 86c0ee80209cdd52e4b360ffcf854144922ac2e6 (patch) | |
tree | 722f7ddcfaa702cf834d4fe2b8d63f1a2638398c /source/blender/editors/space_view3d/view3d_utils.c | |
parent | 213ac7b1aceea3b5a210e86a07402d4415c9a6b6 (diff) |
3D View: support for editing cursor rotation
Add buttons for editing the cursor rotation as well as rotation modes,
similar to object and pose bones.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_utils.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_utils.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c index 1d8f7e2606c..8a343281bf1 100644 --- a/source/blender/editors/space_view3d/view3d_utils.c +++ b/source/blender/editors/space_view3d/view3d_utils.c @@ -45,6 +45,7 @@ #include "BKE_context.h" #include "BKE_object.h" #include "BKE_screen.h" +#include "BKE_scene.h" #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" @@ -88,13 +89,15 @@ void ED_view3d_background_color_get(const Scene *scene, const View3D *v3d, float void ED_view3d_cursor3d_calc_mat3(const Scene *scene, float mat[3][3]) { const View3DCursor *cursor = &scene->cursor; - quat_to_mat3(mat, cursor->rotation); + BKE_scene_cursor_rot_to_mat3(cursor, mat); } void ED_view3d_cursor3d_calc_mat4(const Scene *scene, float mat[4][4]) { const View3DCursor *cursor = &scene->cursor; - quat_to_mat4(mat, cursor->rotation); + float mat3[3][3]; + BKE_scene_cursor_rot_to_mat3(cursor, mat3); + copy_m4_m3(mat, mat3); copy_v3_v3(mat[3], cursor->location); } |