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>2013-07-05 12:45:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-05 12:45:42 +0400
commit0d18f1829a0cd724e75dd3f87bfc0ac0dd3f5464 (patch)
treeb8af7d97c4abb40648e8e9506ddd8ff7c9c33669 /source/blender/bmesh/operators/bmo_bridge.c
parent970a4c7cc4ce50ea204f7525ebd160b93bbcd0a7 (diff)
fix [#35989] bridge tool flip mash
open edge loops were calculating flipping incorrectly.
Diffstat (limited to 'source/blender/bmesh/operators/bmo_bridge.c')
-rw-r--r--source/blender/bmesh/operators/bmo_bridge.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/bmesh/operators/bmo_bridge.c b/source/blender/bmesh/operators/bmo_bridge.c
index 045997fb6be..6b124a3030a 100644
--- a/source/blender/bmesh/operators/bmo_bridge.c
+++ b/source/blender/bmesh/operators/bmo_bridge.c
@@ -189,7 +189,10 @@ static void bridge_loop_pair(BMesh *bm,
((BMVert *)(((LinkData *)lb_b->first)->data))->co,
((BMVert *)(((LinkData *)lb_b->last)->data))->co);
- /* this isnt totally reliable but works well in most cases */
+ /* make the directions point out from the normals, 'no' is used as a temp var */
+ cross_v3_v3v3(no, dir_a, el_dir); cross_v3_v3v3(dir_a, no, el_dir);
+ cross_v3_v3v3(no, dir_b, el_dir); cross_v3_v3v3(dir_b, no, el_dir);
+
if (dot_v3v3(dir_a, dir_b) < 0.0f) {
BM_edgeloop_flip(bm, el_store_b);
}