diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-14 12:29:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-14 12:37:47 +0300 |
commit | fecec7dd6889785e4f11aa95f40ad30b225a01c8 (patch) | |
tree | 3353992e93b35c82094f73b0e97fdb2a86e32c07 /source/blender/editors/manipulator_library | |
parent | f35572ae9e45929a0d2852e52a78613cc3f3418f (diff) |
3D View: Show view-aligned rotation manipulators
Diffstat (limited to 'source/blender/editors/manipulator_library')
-rw-r--r-- | source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c index a3034597f56..643a379cbb0 100644 --- a/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c +++ b/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c @@ -94,6 +94,9 @@ typedef struct DialInteraction { #define DIAL_WIDTH 1.0f #define DIAL_RESOLUTION 48 +/* Could make option, negative to clip more (don't show when view aligned). */ +#define DIAL_CLIP_BIAS 0.02 + /** * We can't use this for the #wmManipulatorType.matrix_basis_get callback, it conflicts with depth picking. */ @@ -347,6 +350,7 @@ static void manipulator_dial_draw_select(const bContext *C, wmManipulator *mpr, copy_v3_v3(clip_plane, rv3d->viewinv[2]); clip_plane[3] = -dot_v3v3(rv3d->viewinv[2], mpr->matrix_basis[3]); + clip_plane[3] += DIAL_CLIP_BIAS * mpr->scale_final; glEnable(GL_CLIP_DISTANCE0); } @@ -373,7 +377,7 @@ static void manipulator_dial_draw(const bContext *C, wmManipulator *mpr) copy_v3_v3(clip_plane, rv3d->viewinv[2]); clip_plane[3] = -dot_v3v3(rv3d->viewinv[2], mpr->matrix_basis[3]); - clip_plane[3] -= 0.02f * mpr->scale_final; + clip_plane[3] += DIAL_CLIP_BIAS * mpr->scale_final; glEnable(GL_CLIP_DISTANCE0); } |