Cleanup: minor corrections
This commit is contained in:
parent
de687b6fa0
commit
3a3f80673c
@ -421,7 +421,7 @@ static void findnearestvert__doClosest(void *userData, BMVert *eve, const float
|
|||||||
* \param use_select_bias
|
* \param use_select_bias
|
||||||
* - When true, selected vertice are given a 5 pixel bias to make them further than unselect verts.
|
* - 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.
|
* - 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(
|
BMVert *EDBM_vert_find_nearest_ex(
|
||||||
ViewContext *vc, float *r_dist,
|
ViewContext *vc, float *r_dist,
|
||||||
@ -590,7 +590,7 @@ BMEdge *EDBM_edge_find_nearest_ex(
|
|||||||
else {
|
else {
|
||||||
struct NearestEdgeUserData data = {{0}};
|
struct NearestEdgeUserData data = {{0}};
|
||||||
const struct NearestEdgeUserData_Hit *hit;
|
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;
|
const eV3DProjTest clip_flag = V3D_PROJ_TEST_CLIP_DEFAULT & ~V3D_PROJ_TEST_CLIP_BB;
|
||||||
|
|
||||||
static int prev_select_index = 0;
|
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);
|
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.
|
/* best distance based on screen coords.
|
||||||
* use em->selectmode to define how to use
|
* use em->selectmode to define how to use
|
||||||
|
@ -1558,7 +1558,6 @@ unsigned int ED_view3d_backbuf_sample_rect(
|
|||||||
const unsigned int *bufmin, *bufmax, *tbuf;
|
const unsigned int *bufmin, *bufmax, *tbuf;
|
||||||
int minx, miny;
|
int minx, miny;
|
||||||
int a, b, rc, nr, amount, dirvec[4][2];
|
int a, b, rc, nr, amount, dirvec[4][2];
|
||||||
int distance = 0;
|
|
||||||
unsigned int index = 0;
|
unsigned int index = 0;
|
||||||
|
|
||||||
amount = (size - 1) / 2;
|
amount = (size - 1) / 2;
|
||||||
@ -1583,7 +1582,7 @@ unsigned int ED_view3d_backbuf_sample_rect(
|
|||||||
for (nr = 1; nr <= size; nr++) {
|
for (nr = 1; nr <= size; nr++) {
|
||||||
|
|
||||||
for (a = 0; a < 2; a++) {
|
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) {
|
if (*tbuf && *tbuf >= min && *tbuf < max) {
|
||||||
/* we got a hit */
|
/* 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)) {
|
if ((ima->flag & IMA_IS_STEREO)) {
|
||||||
iuser->flag |= IMA_SHOW_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;
|
iuser->multiview_eye = STEREO_LEFT_ID;
|
||||||
|
}
|
||||||
|
else if (v3d->stereo3d_camera != STEREO_3D_ID) {
|
||||||
/* show only left or right camera */
|
/* show only left or right camera */
|
||||||
else if (v3d->stereo3d_camera != STEREO_3D_ID)
|
|
||||||
iuser->multiview_eye = v3d->stereo3d_camera;
|
iuser->multiview_eye = v3d->stereo3d_camera;
|
||||||
|
}
|
||||||
|
|
||||||
BKE_image_multiview_index(ima, iuser);
|
BKE_image_multiview_index(ima, iuser);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
iuser->flag &= ~IMA_SHOW_STEREO;
|
iuser->flag &= ~IMA_SHOW_STEREO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
|
static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user