diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-26 23:10:34 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-26 23:10:34 +0400 |
commit | 864c4112e9ac6891b58e94e563e2342ea1d895b8 (patch) | |
tree | 2cdf4fa6fed0a815c93c805c1dfc6d09f961f3fa /source | |
parent | c71ab7e774aa17651d4604110eba894dc1c009ba (diff) |
Fix #33316: mesh edge short path select was wrong on large/small objects.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index a6b798c8887..b46961a95d7 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1267,12 +1267,12 @@ static float step_cost_3_v3(const float v1[3], const float v2[3], const float v3 /* The cost is based on the simple sum of the length of the two edgees... */ sub_v3_v3v3(d1, v2, v1); sub_v3_v3v3(d2, v3, v2); - cost = len_v3(d1) + len_v3(d2); + cost = normalize_v3(d1) + normalize_v3(d2); /* but is biased to give higher values to sharp turns, so that it will take * paths with fewer "turns" when selecting between equal-weighted paths between * the two edges */ - cost = cost + 0.5f * cost * (2.0f - sqrtf(fabsf(dot_v3v3(d1, d2)))); + cost = cost * (1.0f + 0.5f * (2.0f - sqrtf(fabsf(dot_v3v3(d1, d2))))); return cost; } |