diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2010-10-31 04:18:26 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2010-10-31 04:18:26 +0300 |
commit | 73f21f20b789ed1474274b0d27778eede4108569 (patch) | |
tree | b2e309aa70a249bb536ace095d8fd7cd30431cb6 /source/blender/editors | |
parent | bae43df4ec359fb08a9ae45feb44eb5d24a4e5f8 (diff) |
Lock to Cursor
Patch by Dan Eicher. In 3dview properties you can enable this. Rotating view then uses cursor as pivot point. Note that with this option enabled just relocating the 3d cursor also changes the 3dview.
Sebastian König: "Now the 3d cursor is actually useful" (sitting next to me while applying patch at bconf hostel)
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 6cbce905f33..f876e420d89 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1205,6 +1205,11 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d) } translate_m4( rv3d->viewmat,-vec[0], -vec[1], -vec[2]); } + else if (v3d->ob_centre_cursor) { + float vec[3]; + copy_v3_v3(vec, give_cursor(scene, v3d)); + translate_m4(rv3d->viewmat, -vec[0], -vec[1], -vec[2]); + } else translate_m4( rv3d->viewmat,rv3d->ofs[0], rv3d->ofs[1], rv3d->ofs[2]); } } |