diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-22 07:31:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-22 07:31:21 +0400 |
commit | c80c1c6f5c90b446652cc866484b966bdcbc6b60 (patch) | |
tree | b986b36f0f454abd8fe2b2f23d2fcd26a42b5c29 /source/blender/editors | |
parent | 6193963daae293e090779bcec361dfd81c67e32f (diff) |
add copy_v4_fl4, replace QUATSET macro.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index b74527159c2..61c6d5c00dd 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -774,33 +774,31 @@ static void obmat_to_viewmat(RegionView3D *rv3d, Object *ob) mat3_to_quat(rv3d->viewquat, tmat); } -#define QUATSET(a, b, c, d, e) { a[0] = b; a[1] = c; a[2] = d; a[3] = e; } (void)0 - bool ED_view3d_lock(RegionView3D *rv3d) { switch (rv3d->view) { case RV3D_VIEW_BOTTOM: - QUATSET(rv3d->viewquat, 0.0, -1.0, 0.0, 0.0); + copy_v4_fl4(rv3d->viewquat, 0.0, -1.0, 0.0, 0.0); break; case RV3D_VIEW_BACK: - QUATSET(rv3d->viewquat, 0.0, 0.0, -M_SQRT1_2, -M_SQRT1_2); + copy_v4_fl4(rv3d->viewquat, 0.0, 0.0, -M_SQRT1_2, -M_SQRT1_2); break; case RV3D_VIEW_LEFT: - QUATSET(rv3d->viewquat, 0.5, -0.5, 0.5, 0.5); + copy_v4_fl4(rv3d->viewquat, 0.5, -0.5, 0.5, 0.5); break; case RV3D_VIEW_TOP: - QUATSET(rv3d->viewquat, 1.0, 0.0, 0.0, 0.0); + copy_v4_fl4(rv3d->viewquat, 1.0, 0.0, 0.0, 0.0); break; case RV3D_VIEW_FRONT: - QUATSET(rv3d->viewquat, M_SQRT1_2, -M_SQRT1_2, 0.0, 0.0); + copy_v4_fl4(rv3d->viewquat, M_SQRT1_2, -M_SQRT1_2, 0.0, 0.0); break; case RV3D_VIEW_RIGHT: - QUATSET(rv3d->viewquat, 0.5, -0.5, -0.5, -0.5); + copy_v4_fl4(rv3d->viewquat, 0.5, -0.5, -0.5, -0.5); break; default: return false; |