diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-07-12 23:32:36 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-07-12 23:32:36 +0400 |
commit | 50262b5ea9f107930c0f08913d0de307c4edecc0 (patch) | |
tree | 6aad17765f0a10f4083123089a49af1c467144e2 /source/blender/editors | |
parent | 7e304b13e758161428de8601d78fe77ae87ac33f (diff) |
Fix #35827: object selection through camera view not working in some cases.
The problem was that when the camera is selected, the transform manipulator
is located exactly at the camera view location, and this was blocking selection
of other objects with some OpenGL implementations.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_manipulator.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 5059e3bcc40..5b777a1cda3 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -1641,6 +1641,11 @@ void BIF_draw_manipulator(const bContext *C) mul_mat3_m4_fl(rv3d->twmat, ED_view3d_pixel_size(rv3d, rv3d->twmat[3]) * U.tw_size * 5.0f); } + /* when looking through a selected camera, the manipulator can be at the + * exact same position as the view, skip so we don't break selection */ + if (fabsf(mat4_to_scale(rv3d->twmat)) < 1e-7f) + return; + test_manipulator_axis(C); drawflags = rv3d->twdrawflag; /* set in calc_manipulator_stats */ @@ -1679,6 +1684,11 @@ static int manipulator_selectbuf(ScrArea *sa, ARegion *ar, const int mval[2], fl short hits; extern void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); // XXX check a bit later on this... (ton) + /* when looking through a selected camera, the manipulator can be at the + * exact same position as the view, skip so we don't break selection */ + if (fabsf(mat4_to_scale(rv3d->twmat)) < 1e-7f) + return 0; + G.f |= G_PICKSEL; rect.xmin = mval[0] - hotspot; |