diff options
author | Campbell Barton <campbell@blender.org> | 2022-05-19 06:06:45 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-05-19 06:06:45 +0300 |
commit | 76b674198123eb0c5d77270ae037ad9c6c32c321 (patch) | |
tree | 2d5456125445b0d290ecc3081469f69f45ac9818 /source/blender/editors/space_view3d/view3d_navigate_roll.c | |
parent | 214e61fc2ca17affc971d7f7838a748ea8e93b4a (diff) |
Fix View Roll failure to align the quaternion to the view-axis
View roll checked if the resulting roll was close to a view axis
but didn't write the aligned quaternion back to the final result.
Add ED_view3d_quat_to_axis_view_and_reset_quat since most callers
to ED_view3d_quat_to_axis_view will reset the quaternion when a view
aligned axis is found.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_navigate_roll.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_navigate_roll.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/view3d_navigate_roll.c b/source/blender/editors/space_view3d/view3d_navigate_roll.c index ea21eed6445..087ca72211e 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_roll.c +++ b/source/blender/editors/space_view3d/view3d_navigate_roll.c @@ -48,11 +48,7 @@ static void view_roll_angle(ARegion *region, normalize_qt(quat); if (use_axis_view && RV3D_VIEW_IS_AXIS(rv3d->view) && (fabsf(angle) == (float)M_PI_2)) { - if (ED_view3d_quat_to_axis_view(quat, 0.01f, &rv3d->view, &rv3d->view_axis_roll)) { - if (rv3d->view != RV3D_VIEW_USER) { - ED_view3d_quat_from_axis_view(rv3d->view, rv3d->view_axis_roll, quat_mul); - } - } + ED_view3d_quat_to_axis_view_and_reset_quat(quat, 0.01f, &rv3d->view, &rv3d->view_axis_roll); } else { rv3d->view = RV3D_VIEW_USER; |