[Bf-blender-cvs] [1253a46] blender-v2.73-release: Fix for regression in bmesh connect-pair
Campbell Barton
noreply at git.blender.org
Tue Jan 20 10:23:27 CET 2015
Commit: 1253a46370b31eee032e6fd4738d0cb9bc78d0e1
Author: Campbell Barton
Date: Sat Jan 10 12:20:17 2015 +1100
Branches: blender-v2.73-release
https://developer.blender.org/rB1253a46370b31eee032e6fd4738d0cb9bc78d0e1
Fix for regression in bmesh connect-pair
T42563 fix wasn't right, fortunately this doesn't fail in most cases.
===================================================================
M source/blender/bmesh/operators/bmo_connect_pair.c
===================================================================
diff --git a/source/blender/bmesh/operators/bmo_connect_pair.c b/source/blender/bmesh/operators/bmo_connect_pair.c
index b82823e..9db87dd 100644
--- a/source/blender/bmesh/operators/bmo_connect_pair.c
+++ b/source/blender/bmesh/operators/bmo_connect_pair.c
@@ -464,19 +464,23 @@ void bmo_connect_vert_pair_exec(BMesh *bm, BMOperator *op)
negate_v3(basis_nor_b);
}
add_v3_v3v3(basis_nor, basis_nor_a, basis_nor_b);
-
- if (UNLIKELY(fabsf(dot_v3v3(basis_nor, basis_dir)) < FLT_EPSILON)) {
- ortho_v3_v3(basis_nor, basis_dir);
- }
}
#endif
/* get third axis */
+ normalize_v3(basis_dir);
+ normalize_v3(basis_nor);
cross_v3_v3v3(basis_tmp, basis_dir, basis_nor);
+ if (UNLIKELY(normalize_v3(basis_tmp) < FLT_EPSILON)) {
+ ortho_v3_v3(basis_nor, basis_dir);
+ normalize_v3(basis_nor);
+ cross_v3_v3v3(basis_tmp, basis_dir, basis_nor);
+ normalize_v3(basis_tmp);
+ }
- normalize_v3_v3(pc.matrix[0], basis_tmp);
- normalize_v3_v3(pc.matrix[1], basis_dir);
- normalize_v3_v3(pc.matrix[2], basis_nor);
+ copy_v3_v3(pc.matrix[0], basis_tmp);
+ copy_v3_v3(pc.matrix[1], basis_dir);
+ copy_v3_v3(pc.matrix[2], basis_nor);
invert_m3(pc.matrix);
pc.axis_sep = dot_m3_v3_row_x(pc.matrix, pc.v_a->co);
More information about the Bf-blender-cvs
mailing list