diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-03-11 08:34:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-03-11 08:34:19 +0400 |
commit | 57dba739176153e052d77611ff0e554f05984686 (patch) | |
tree | 317fc95876975a9743d6da1eb44513ed8bd2237d /source/blender/editors/space_view3d/view3d_select.c | |
parent | 23fbc9f22f3dfd7151c4396a17fbe586b0594d81 (diff) |
View3d: take pixelsize into account for selection distance
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 47f30e3e279..de1516222c3 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -98,6 +98,11 @@ #include "view3d_intern.h" /* own include */ +float ED_view3d_select_dist_px(void) +{ + return 75.0f * U.pixelsize; +} + /* TODO: should return whether there is valid context to continue */ void view3d_set_viewcontext(bContext *C, ViewContext *vc) { @@ -1380,7 +1385,7 @@ static bool mouse_select(bContext *C, const int mval[2], Scene *scene = CTX_data_scene(C); Base *base, *startbase = NULL, *basact = NULL, *oldbasact = NULL; bool is_obedit; - float dist = 100.0f; + float dist = ED_view3d_select_dist_px() * 1.3333f; int retval = false; short hits; const float mval_fl[2] = {(float)mval[0], (float)mval[1]}; |