diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-01-07 22:09:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-07 22:09:54 +0300 |
commit | e63c773b7c7cc3cd4db1ee986942818f2a675c3e (patch) | |
tree | 17cceb2fe65e2ebe245b2aed31b6e940f9591261 | |
parent | d755b0825987b1ef49753a8a6b8aaf02982b017c (diff) |
Correct check when no path can be found
-rw-r--r-- | release/scripts/startup/bl_operators/bmesh/find_adjacent.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_operators/bmesh/find_adjacent.py b/release/scripts/startup/bl_operators/bmesh/find_adjacent.py index bfe44ee187c..ad73849ce2f 100644 --- a/release/scripts/startup/bl_operators/bmesh/find_adjacent.py +++ b/release/scripts/startup/bl_operators/bmesh/find_adjacent.py @@ -179,17 +179,22 @@ def elems_depth_measure(ele_dst, ele_src, other_edges_over_cb): stack_new[:] = [] depth += 1 - return [vert_depths[v] for v in ele_dst_verts] + if not all_dst: + return [vert_depths[v] for v in ele_dst_verts] + else: + return None def find_next(ele_dst, ele_src): depth_src_a = elems_depth_measure(ele_dst, ele_src, other_edges_over_edge) depth_src_b = elems_depth_measure(ele_dst, ele_src, other_edges_over_face) - depth_src = tuple(zip(depth_src_a, depth_src_b)) - if depth_src is None: + # path not found + if depth_src_a is None or depth_src_b is None: return [] + depth_src = tuple(zip(depth_src_a, depth_src_b)) + candidates = elems_depth_search(ele_dst, depth_src_a, other_edges_over_edge) candidates = elems_depth_search(ele_dst, depth_src_b, other_edges_over_face, candidates) candidates.discard(ele_src) |