Fix T87080: Select shortest path fails in face mode

Regression in 80cbbd2843.

Unfortunately keeping selection picking behavior as well as
supporting finding the nearest face within a radius requires an
inconsistency between x-ray and back-buffer selection that
doesn't work well using the current arguments.

Resolve by adding an argument that causes the input distance
to be ignored for back-buffer selection.

This is used by selection picking but not the knife tool.

This changes behavior for path-selection in face mode,
which now uses a margin for back-buffer selection.

From my own testing this doesn't seem to be a problem like it could be
for regular selection picking.
This commit is contained in:
2021-03-31 23:27:07 +11:00
parent d97dca5106
commit 14901e3774
3 changed files with 12 additions and 16 deletions

View File

@@ -186,6 +186,7 @@ struct BMEdge *EDBM_edge_find_nearest(struct ViewContext *vc, float *r_dist);
struct BMFace *EDBM_face_find_nearest_ex(struct ViewContext *vc,
float *r_dist,
float *r_dist_center,
const bool use_zbuf_single_px,
const bool use_select_bias,
bool use_cycle,
struct BMFace **r_efa_zbuf,