Commit: 6aadd61bd892d3908ed815171553a3c52144ec6c
Author: Campbell Barton
Date:   Tue Feb 27 22:02:18 2018 +1100
Branches: master
https://developer.blender.org/rB6aadd61bd892d3908ed815171553a3c52144ec6c

Cleanup: remove unused duplicate code

===================================================================

M       source/blender/editors/space_view3d/view3d_draw.c
M       source/blender/editors/space_view3d/view3d_select.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_draw.c 
b/source/blender/editors/space_view3d/view3d_draw.c
index f999fab88ac..94c7ff5a051 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1555,8 +1555,10 @@ ImBuf *ED_view3d_backbuf_read(ViewContext *vc, int xmin, 
int ymin, int xmax, int
        }
 }
 
-/* smart function to sample a rect spiralling outside, nice for backbuf 
selection */
-unsigned int ED_view3d_backbuf_sample_rect(
+/**
+ * Smart function to sample a rectangle spiral ling outside, nice for backbuf 
selection
+ */
+uint ED_view3d_backbuf_sample_rect(
         ViewContext *vc, const int mval[2], int size,
         unsigned int min, unsigned int max, float *r_dist)
 {
diff --git a/source/blender/editors/space_view3d/view3d_select.c 
b/source/blender/editors/space_view3d/view3d_select.c
index 82c239eb320..68c35115584 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -916,61 +916,8 @@ void VIEW3D_OT_select_lasso(wmOperatorType *ot)
        WM_operator_properties_gesture_lasso_select(ot);
 }
 
-
-/* ************************************************* */
-
-#if 0
-/* smart function to sample a rect spiralling outside, nice for backbuf 
selection */
-static unsigned int samplerect(unsigned int *buf, int size, unsigned int 
dontdo)
-{
-       Base *base;
-       unsigned int *bufmin, *bufmax;
-       int a, b, rc, tel, len, dirvec[4][2], maxob;
-       unsigned int retval = 0;
-       
-       base = LASTBASE;
-       if (base == 0) return 0;
-       maxob = base->selcol;
-
-       len = (size - 1) / 2;
-       rc = 0;
-
-       dirvec[0][0] = 1;
-       dirvec[0][1] = 0;
-       dirvec[1][0] = 0;
-       dirvec[1][1] = -size;
-       dirvec[2][0] = -1;
-       dirvec[2][1] = 0;
-       dirvec[3][0] = 0;
-       dirvec[3][1] = size;
-
-       bufmin = buf;
-       bufmax = buf + size * size;
-       buf += len * size + len;
-
-       for (tel = 1; tel <= size; tel++) {
-
-               for (a = 0; a < 2; a++) {
-                       for (b = 0; b < tel; b++) {
-
-                               if (*buf && *buf <= maxob && *buf != dontdo) 
return *buf;
-                               if (*buf == dontdo) retval = dontdo;  /* if 
only color dontdo is available, still return dontdo */
-                               
-                               buf += (dirvec[rc][0] + dirvec[rc][1]);
-
-                               if (buf < bufmin || buf >= bufmax) return 
retval;
-                       }
-                       rc++;
-                       rc &= 3;
-               }
-       }
-       return retval;
-}
-#endif
-
 /* ************************** mouse select ************************* */
 
-
 /* The max number of menu items in an object select menu */
 typedef struct SelMenuItemF {
        char idname[MAX_ID_NAME - 2];

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to