diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-20 19:06:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-20 20:10:32 +0300 |
commit | d57a93a7cb4d54e1ce0d890540926ef6ab88270a (patch) | |
tree | 99e6f25c6d3a3d294db90301d78ad25f2f25e4b7 /source/blender/editors/space_view3d | |
parent | 0626d27bf62e41bf34191d011fe0e52a4c622ec6 (diff) |
Fix T44383: Select face fails in some positions
When mixing vert/edge/face with select-visible,
face selection could fail when not close enough to the center.
This also fixes a bug where the bias for verts over edges would
prefer faces over edges too, making edges harder to pick.
Mixing edge with other selection modes works more predictably now.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 39e21e297e8..6cfc6ae4ddd 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1460,6 +1460,15 @@ void view3d_validate_backbuf(ViewContext *vc) backdrawview3d(vc->scene, vc->ar, vc->v3d); } +/** + * allow for small values [0.5 - 2.5], + * and large values, FLT_MAX by clamping by the area size + */ +int view3d_backbuf_sample_size_clamp(ARegion *ar, const float dist) +{ + return (int)min_ff(ceilf(dist), (float)max_ii(ar->winx, ar->winx)); +} + /* samples a single pixel (copied from vpaint) */ unsigned int view3d_sample_backbuf(ViewContext *vc, int x, int y) { |