diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-12 20:45:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-12 20:48:23 +0300 |
commit | e160da30ea18223379eed160ba10c74af0d505e1 (patch) | |
tree | c53843fd19caa075e0d41ff71ba48d111005c2ca /source/blender/editors/space_view3d/view3d_view.c | |
parent | f8de442a355023285a3d69a24f48dd79be3ceeaf (diff) |
View3D: Quad-view opposite axis switching
Pressing Numpad9 now orbits to the opposite side in any viewport,
with the advantage that it can switch locked-quadview axis to their opposite side.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_view.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 76d9762ab09..4888c6846d2 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -896,6 +896,21 @@ char ED_view3d_lock_view_from_index(int index) } +char ED_view3d_axis_view_opposite(char view) +{ + switch (view) { + case RV3D_VIEW_FRONT: return RV3D_VIEW_BACK; + case RV3D_VIEW_BACK: return RV3D_VIEW_FRONT; + case RV3D_VIEW_LEFT: return RV3D_VIEW_RIGHT; + case RV3D_VIEW_RIGHT: return RV3D_VIEW_LEFT; + case RV3D_VIEW_TOP: return RV3D_VIEW_BOTTOM; + case RV3D_VIEW_BOTTOM: return RV3D_VIEW_TOP; + } + + return RV3D_VIEW_USER; +} + + bool ED_view3d_lock(RegionView3D *rv3d) { return ED_view3d_quat_from_axis_view(rv3d->view, rv3d->viewquat); |