diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-21 17:13:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-21 17:16:26 +0300 |
commit | 3a3f80673cde9e4e9ca5f9d28b48b1c0587bbbea (patch) | |
tree | 2a5e9a17afe6964677e6eb76ffba14f163dc8cfd /source | |
parent | de687b6fa02138146294c0a9a810c5234f1ac0dc (diff) |
Cleanup: minor corrections
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 7 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 15 |
2 files changed, 13 insertions, 9 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 92c7dde1f6f..f3e3bd9e7c0 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -421,7 +421,7 @@ static void findnearestvert__doClosest(void *userData, BMVert *eve, const float * \param use_select_bias * - When true, selected vertice are given a 5 pixel bias to make them further than unselect verts. * - When false, unselected vertice are given the bias. - * \param is_strict When true, the vertice corresponding to the sel parameter are ignored and not just biased + * \param use_cycle Cycle over elements within #FIND_NEAR_CYCLE_THRESHOLD_MIN in order of index. */ BMVert *EDBM_vert_find_nearest_ex( ViewContext *vc, float *r_dist, @@ -590,7 +590,7 @@ BMEdge *EDBM_edge_find_nearest_ex( else { struct NearestEdgeUserData data = {{0}}; const struct NearestEdgeUserData_Hit *hit; - /* interpolate along the edge before doing a boundbox check */ + /* interpolate along the edge before doing a clipping plane test */ const eV3DProjTest clip_flag = V3D_PROJ_TEST_CLIP_DEFAULT & ~V3D_PROJ_TEST_CLIP_BB; static int prev_select_index = 0; @@ -788,6 +788,9 @@ BMFace *EDBM_face_find_nearest(ViewContext *vc, float *r_dist) return EDBM_face_find_nearest_ex(vc, r_dist, false, false, NULL); } +#undef FIND_NEAR_SELECT_BIAS +#undef FIND_NEAR_CYCLE_THRESHOLD_MIN + /* best distance based on screen coords. * use em->selectmode to define how to use diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index a69a6be298e..0be1ad66ec8 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1558,7 +1558,6 @@ unsigned int ED_view3d_backbuf_sample_rect( const unsigned int *bufmin, *bufmax, *tbuf; int minx, miny; int a, b, rc, nr, amount, dirvec[4][2]; - int distance = 0; unsigned int index = 0; amount = (size - 1) / 2; @@ -1583,7 +1582,7 @@ unsigned int ED_view3d_backbuf_sample_rect( for (nr = 1; nr <= size; nr++) { for (a = 0; a < 2; a++) { - for (b = 0; b < nr; b++, distance++) { + for (b = 0; b < nr; b++) { if (*tbuf && *tbuf >= min && *tbuf < max) { /* we got a hit */ @@ -1622,17 +1621,19 @@ static void view3d_stereo_bgpic_setup(Scene *scene, View3D *v3d, Image *ima, Ima if ((ima->flag & IMA_IS_STEREO)) { iuser->flag |= IMA_SHOW_STEREO; - if ((scene->r.scemode & R_MULTIVIEW) == 0) + if ((scene->r.scemode & R_MULTIVIEW) == 0) { iuser->multiview_eye = STEREO_LEFT_ID; - - /* show only left or right camera */ - else if (v3d->stereo3d_camera != STEREO_3D_ID) + } + else if (v3d->stereo3d_camera != STEREO_3D_ID) { + /* show only left or right camera */ iuser->multiview_eye = v3d->stereo3d_camera; + } BKE_image_multiview_index(ima, iuser); } - else + else { iuser->flag &= ~IMA_SHOW_STEREO; + } } static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d, |