Merge commit '6aadd61bd892d3908ed8151' into blender2.8

This commit is contained in:
Dalai Felinto
2018-02-27 13:48:26 -03:00

View File

@@ -904,61 +904,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->object->select_color;
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];