Page MenuHome

Fix T87080: Select shortest path in face selection mode broken
AbandonedPublic

Authored by Philipp Oeser (lichtwerk) on Mar 31 2021, 1:07 PM.

Details

Summary

Caused by rB80cbbd2843c2: Knife: support vert/edge snapping when not directly over a face.

Above commit changed the logic so that the distance argument to
EDBM_face_find_nearest is respected (forcing the distance to zero for the
particular case of this report). However this lead to a check in
EDBM_face_find_nearest_ex never returning a BMFace (because dist_test and
r_dist were both zero).

If I understand the logic correctly, we should still return the found
face in this case, ignoring the distance check [which is what this patch
does].

Diff Detail

Repository
rB Blender
Branch
T87080 (branched from master)
Build Status
Buildable 13842
Build 13842: arc lint + arc unit

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Mar 31 2021, 1:07 PM
Philipp Oeser (lichtwerk) created this revision.

Looks good.
I personally think that, instead of the bool, if we change the condition to:

if (dist_test < *r_dist || dist_test == 0.0f) {

or even

if (dist_test <= *r_dist) {

The code would be more understandable.

(But it is only a minor observation).

This revision is now accepted and ready to land.Mar 31 2021, 2:48 PM