From 8e981efe38ae6d0760f08c49564010104eee78c6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 9 Feb 2020 11:50:25 +1100 Subject: 3D View: support axis views with axis-aligned roll Previously any of the named views could not have any roll, this commit supports roll as long as it's axis-aligned (90,180,270 deg). This is useful for snapping to views, an improvement on cebd025e02f11. --- source/blender/editors/include/ED_view3d.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index cfeffae1052..a1bc3b028b6 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -622,9 +622,11 @@ void ED_view3d_update_viewmat(struct Depsgraph *depsgraph, float winmat[4][4], const struct rcti *rect, bool offscreen); -bool ED_view3d_quat_from_axis_view(const char view, float quat[4]); -char ED_view3d_quat_to_axis_view(const float quat[4], const float epsilon); -bool ED_view3d_quat_is_axis_aligned(const float viewquat[4]); +bool ED_view3d_quat_from_axis_view(const char view, const char view_axis_roll, float quat[4]); +bool ED_view3d_quat_to_axis_view(const float viewquat[4], + const float epsilon, + char *r_view, + char *r_view_axis_rotation); char ED_view3d_lock_view_from_index(int index); char ED_view3d_axis_view_opposite(char view); -- cgit v1.2.3