forked from bartvdbraak/blender
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.
This commit is contained in:
parent
7e304b13e7
commit
50262b5ea9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user