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>2015-08-01 08:11:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-08-01 08:11:45 +0300
commit0e9051fbfefbff8f043b98a4750a1e33ec0e85d8 (patch)
tree1ffd545286de183f130d4b742d3edc6f201a94fa /source/blender/bmesh
parentd894fcb79972e5475ec1b301f2be794ef53dda3d (diff)
BMesh connect pair, fallback to identity matrix
For overlapping vertices, a matrix for the operation can't be calculated.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/operators/bmo_connect_pair.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/bmesh/operators/bmo_connect_pair.c b/source/blender/bmesh/operators/bmo_connect_pair.c
index cf0e233fe6c..d5bc4db798c 100644
--- a/source/blender/bmesh/operators/bmo_connect_pair.c
+++ b/source/blender/bmesh/operators/bmo_connect_pair.c
@@ -556,7 +556,9 @@ void bmo_connect_vert_pair_exec(BMesh *bm, BMOperator *op)
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);
+ if (invert_m3(pc.matrix) == false) {
+ unit_m3(pc.matrix);
+ }
pc.axis_sep = dot_m3_v3_row_x(pc.matrix, pc.v_a->co);
}
@@ -598,6 +600,11 @@ void bmo_connect_vert_pair_exec(BMesh *bm, BMOperator *op)
else {
/* didn't reach the end, remove it,
* links are shared between states so just free the link_pool at the end */
+
+#ifdef DEBUG_PRINT
+ printf("%s: state %p removed\n", __func__, state);
+#endif
+
BLI_remlink(&pc.state_lb, state);
MEM_freeN(state);
}