Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-04-22 22:23:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-22 22:33:07 +0400
commitf2c483d108a33cb30f3f9c984c289e98a25ce5c2 (patch)
tree130f3e05dc45de7603a222c417a281c4efa0c65b /source/blender/bmesh/operators
parenta892cf683be27b15a87ae0d9c21b5ed512497a1a (diff)
Fix T39429: Project paint error with UV bleed
Diffstat (limited to 'source/blender/bmesh/operators')
-rw-r--r--source/blender/bmesh/operators/bmo_inset.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c
index a23f8f33b71..5e2e057c5b6 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -201,7 +201,7 @@ static void bmo_face_inset_individual(
copy_v3_v3(v_new_co, l_iter->v->co);
if (use_even_offset) {
- mul_v3_fl(tvec, shell_angle_to_dist(angle_normalized_v3v3(eno_prev, eno_next) / 2.0f));
+ mul_v3_fl(tvec, shell_v3v3_mid_normalized_to_dist(eno_prev, eno_next));
}
/* Modify vertices and their normals */
@@ -694,14 +694,16 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
/* scale by edge angle */
if (use_even_offset) {
if (is_mid) {
- mul_v3_fl(tvec, shell_angle_to_dist(angle_normalized_v3v3(e_info_a->no,
- e_info_b->no) / 2.0f));
+ mul_v3_fl(tvec, shell_v3v3_mid_normalized_to_dist(e_info_a->no,
+ e_info_b->no));
}
else {
- mul_v3_fl(tvec, shell_angle_to_dist(max_ff(angle_normalized_v3v3(tvec,
- e_info_a->no),
- angle_normalized_v3v3(tvec,
- e_info_b->no))));
+ /* use the largest angle */
+ mul_v3_fl(tvec,
+ shell_v3v3_normalized_to_dist(tvec,
+ len_squared_v3v3(tvec, e_info_a->no) >
+ len_squared_v3v3(tvec, e_info_b->no) ?
+ e_info_a->no : e_info_b->no));
}
}