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:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_utils.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_utils.c7
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);
}