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 <campbell@blender.org>2022-05-19 06:06:45 +0300
committerCampbell Barton <campbell@blender.org>2022-05-19 06:06:45 +0300
commit76b674198123eb0c5d77270ae037ad9c6c32c321 (patch)
tree2d5456125445b0d290ecc3081469f69f45ac9818 /source/blender/editors/include/ED_view3d.h
parent214e61fc2ca17affc971d7f7838a748ea8e93b4a (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/include/ED_view3d.h')
-rw-r--r--source/blender/editors/include/ED_view3d.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 1e9b68c0920..51fd8e6c533 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -1064,6 +1064,16 @@ bool ED_view3d_quat_to_axis_view(const float viewquat[4],
float epsilon,
char *r_view,
char *r_view_axis_rotation);
+/**
+ * A version of #ED_view3d_quat_to_axis_view that updates `viewquat`
+ * if it's within `epsilon` to an axis-view.
+ *
+ * \note Include the special case function since most callers need to perform these operations.
+ */
+bool ED_view3d_quat_to_axis_view_and_reset_quat(float viewquat[4],
+ 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);